Class: ScraperRb::CustomURLMiddleware

Inherits:
Object
  • Object
show all
Defined in:
lib/scraper_rb.rb

Overview

Instance Method Summary collapse

Constructor Details

#initialize(app, options = {}) ⇒ CustomURLMiddleware

Returns a new instance of CustomURLMiddleware.



11
12
13
14
# File 'lib/scraper_rb.rb', line 11

def initialize(app, options = {})
  @app = app
  @options = options
end

Instance Method Details

#call(env) ⇒ Object



16
17
18
19
# File 'lib/scraper_rb.rb', line 16

def call(env)
  $stderr.puts "-> #{env[:url]}"
  @app.call(env)
end