Module: Falconer
- Defined in:
- lib/falconer.rb,
lib/falconer/version.rb,
lib/falconer/class_methods.rb
Defined Under Namespace
Modules: Rails, Store Classes: Rack
Constant Summary collapse
- ACCEPT_HEADER =
'x-falconer-accept-events'
- EVENTS_HEADER =
'x-falconer-events'
- ACCEPT_HEADER_ENV =
"HTTP_#{ACCEPT_HEADER.upcase.gsub('-','_')}"
- VERSION =
'0.0.5'
Class Method Summary collapse
-
.flush ⇒ Array
Returns all queued events and empties queue.
-
.trigger(event, data) ⇒ Object
Triggers a new event to be sent to the Falconer Client.
Class Method Details
.flush ⇒ Array
Returns all queued events and empties queue
17 18 19 20 21 |
# File 'lib/falconer/class_methods.rb', line 17 def flush returned_events = store.events store.clear_events returned_events end |
.trigger(event, data) ⇒ Object
Triggers a new event to be sent to the Falconer Client
9 10 11 |
# File 'lib/falconer/class_methods.rb', line 9 def trigger(event, data) store.add_event(event, data) end |