Class: Capybara::Server::Identify
- Inherits:
-
Object
- Object
- Capybara::Server::Identify
- Defined in:
- lib/capybara/server.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app) ⇒ Identify
constructor
A new instance of Identify.
Constructor Details
#initialize(app) ⇒ Identify
Returns a new instance of Identify.
7 8 9 |
# File 'lib/capybara/server.rb', line 7 def initialize(app) @app = app end |
Instance Method Details
#call(env) ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/capybara/server.rb', line 11 def call(env) if env["PATH_INFO"] == "/__identify__" [200, {}, @app.object_id.to_s] else @app.call(env) end end |