Class: Sinatra::KontagentSettings

Inherits:
Object
  • Object
show all
Defined in:
lib/sinmetrics/kontagent.rb

Instance Method Summary collapse

Constructor Details

#initialize(app, &blk) ⇒ KontagentSettings

Returns a new instance of KontagentSettings.



100
101
102
103
104
105
# File 'lib/sinmetrics/kontagent.rb', line 100

def initialize app, &blk
  @app = app
  @app.set :kontagent_env, @app.environment
  @app.set :kontagent_request, Proc.new { |url| Net::HTTP.get( URI.parse(url) ) }
  instance_eval &blk
end