Class: LogjamAgent::Sinatra::Middleware

Inherits:
Object
  • Object
show all
Defined in:
lib/logjam_agent/sinatra.rb

Instance Method Summary collapse

Constructor Details

#initialize(app) ⇒ Middleware

Returns a new instance of Middleware.



12
13
14
15
# File 'lib/logjam_agent/sinatra.rb', line 12

def initialize(app)
  app_with_logging = LogjamAgent::Rack::Logger.new(app)
  @app = LogjamAgent::Middleware.new(app_with_logging, :sinatra)
end

Instance Method Details

#call(env) ⇒ Object



16
17
18
# File 'lib/logjam_agent/sinatra.rb', line 16

def call(env)
  @app.call(env)
end