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.



9
10
11
# File 'lib/capybara/server.rb', line 9

def initialize(app)
  @app = app
end

Instance Method Details

#call(env) ⇒ Object



13
14
15
16
17
18
19
# File 'lib/capybara/server.rb', line 13

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