Class: EY::Tea::Server::Mock::EchoUri

Inherits:
Object
  • Object
show all
Defined in:
lib/htttee/server/mock.rb

Instance Method Summary collapse

Constructor Details

#initialize(app) ⇒ EchoUri

Returns a new instance of EchoUri.



54
55
56
# File 'lib/htttee/server/mock.rb', line 54

def initialize(app)
  @app = app
end

Instance Method Details

#call(env) ⇒ Object



58
59
60
61
62
63
64
# File 'lib/htttee/server/mock.rb', line 58

def call(env)
  if env['PATH_INFO'] == '/mux-uri'
    [200, {'Content-Type' => 'text/plain'}, [env['X-Mux-Uri']]]
  else
    @app.call(env)
  end
end