Class: Sinatra::MixpanelSettings

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

Instance Method Summary collapse

Constructor Details

#initialize(app, &blk) ⇒ MixpanelSettings

Returns a new instance of MixpanelSettings.



68
69
70
71
72
73
74
# File 'lib/sinmetrics/mixpanel.rb', line 68

def initialize app, &blk
  @app = app
  @app.set :mixpanel_api_key, nil
  @app.set :mixpanel_secret, nil
  @app.set :mixpanel_request, Proc.new { |url| Net::HTTP.get(URI.parse(url)) }
  instance_eval &blk
end