Class: Hci::EndPoint

Inherits:
Object
  • Object
show all
Defined in:
lib/hci/end_point.rb

Instance Method Summary collapse

Constructor Details

#initialize(app) ⇒ EndPoint

Returns a new instance of EndPoint.



4
5
6
# File 'lib/hci/end_point.rb', line 4

def initialize(app)
  @app = app
end

Instance Method Details

#call(env) ⇒ Object



8
9
10
11
12
13
14
15
# File 'lib/hci/end_point.rb', line 8

def call(env)
  if env["PATH_INFO"] =~ /^\/#{Client.callback_path}/
    process_request(env)
  else
    @app.call(env)
  end

end