Class: WatirWebdriverRails::Identify
- Inherits:
-
Object
- Object
- WatirWebdriverRails::Identify
- Defined in:
- lib/watir-webdriver-rails/rails.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.
8 9 10 |
# File 'lib/watir-webdriver-rails/rails.rb', line 8 def initialize(app) @app = app end |
Instance Method Details
#call(env) ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/watir-webdriver-rails/rails.rb', line 12 def call(env) if env["PATH_INFO"] == "/__identify__" [200, {}, [@app.object_id.to_s]] else @app.call(env) end end |