Class: Capybara::Server::Identify

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

Instance Method Summary collapse

Constructor Details

#initialize(app) ⇒ Identify

Returns a new instance of Identify.



12
13
14
# File 'lib/capybara/server.rb', line 12

def initialize(app)
  @app = app
end

Instance Method Details

#call(env) ⇒ Object



16
17
18
19
20
21
22
# File 'lib/capybara/server.rb', line 16

def call(env)
  if env["PATH_INFO"] == "/__identify__"
    [200, {}, @app.object_id.to_s]
  else
    @app.call(env)
  end
end