Class: Rack::TradeTracker

Inherits:
Object
  • Object
show all
Defined in:
lib/rack/trade_tracker.rb,
lib/rack/trade_tracker/cookie.rb,
lib/rack/trade_tracker/handler.rb,
lib/rack/trade_tracker/version.rb,
lib/rack/trade_tracker/parameters.rb,
lib/rack/trade_tracker/parameters/paired.rb,
lib/rack/trade_tracker/parameters/delimited.rb

Defined Under Namespace

Classes: Cookie, Handler, Parameters

Constant Summary collapse

TRACKBACK_URL =
'http://tc.tradetracker.net'.freeze
InitializationError =
Class.new(RuntimeError)
VERSION =
"0.1.3"

Instance Method Summary collapse

Constructor Details

#initialize(app, options = {}) ⇒ TradeTracker

Returns a new instance of TradeTracker.



12
13
14
15
16
# File 'lib/rack/trade_tracker.rb', line 12

def initialize(app, options = {})
  @app = app
  raise InitializationError.new('options must include :domain') unless (@domain = options[:domain])
  raise InitializationError.new('options must include :path') unless (@path = options[:path])
end

Instance Method Details

#call(env) ⇒ Object



18
19
20
# File 'lib/rack/trade_tracker.rb', line 18

def call(env)
  Handler.new(domain, path, app).call(env)
end