Class: Communist::Server::Identify

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

Instance Method Summary collapse

Constructor Details

#initialize(app) ⇒ Identify

Returns a new instance of Identify.



16
17
18
# File 'lib/communist/server.rb', line 16

def initialize(app)
  @app = app
end

Instance Method Details

#call(env) ⇒ Object



20
21
22
23
24
25
26
# File 'lib/communist/server.rb', line 20

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