Class: Rack::Campfire
- Inherits:
-
Object
- Object
- Rack::Campfire
- Defined in:
- lib/rack/campfire/coercion.rb,
lib/rack/campfire/campfire.rb,
lib/rack/campfire/logging.rb,
lib/rack/campfire/hooks.rb
Defined Under Namespace
Modules: Coercion, Hooks, Logging
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, subdomain, api_key, rooms = nil) ⇒ Campfire
constructor
A new instance of Campfire.
Methods included from Logging
Methods included from Coercion
Constructor Details
#initialize(app, subdomain, api_key, rooms = nil) ⇒ Campfire
Returns a new instance of Campfire.
4 5 6 7 8 9 |
# File 'lib/rack/campfire/campfire.rb', line 4 def initialize(app, subdomain, api_key, rooms = nil) @app = app @campfire = campfire(subdomain, api_key) @rooms = coerce_rooms(rooms) listen end |
Instance Method Details
#call(env) ⇒ Object
11 12 13 |
# File 'lib/rack/campfire/campfire.rb', line 11 def call(env) @app.call(env.merge(params)) end |