Class: Specter::Middleware::Proxy

Inherits:
Base
  • Object
show all
Defined in:
lib/specter/middleware/proxy.rb

Instance Method Summary collapse

Constructor Details

#initialize(app, server) ⇒ Proxy

Returns a new instance of Proxy.



7
8
9
10
# File 'lib/specter/middleware/proxy.rb', line 7

def initialize(app, server)
  super
  @miner = Expedition::Client.new(*options[:proxy])
end

Instance Method Details

#call(env) ⇒ Object



12
13
14
15
# File 'lib/specter/middleware/proxy.rb', line 12

def call(env)
  env.merge!(proxy_command(env))
  @app.call(env)
end