Class: EY::Tea::Server::Mock::EchoUri
- Inherits:
-
Object
- Object
- EY::Tea::Server::Mock::EchoUri
- Defined in:
- lib/htttee/server/mock.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app) ⇒ EchoUri
constructor
A new instance of EchoUri.
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 |