Class: EventAPIListener
- Inherits:
-
Object
- Object
- EventAPIListener
- Defined in:
- app/services/event_api_listener.rb
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(application, event_category, event_name) ⇒ EventAPIListener
constructor
A new instance of EventAPIListener.
Constructor Details
#initialize(application, event_category, event_name) ⇒ EventAPIListener
Returns a new instance of EventAPIListener.
6 7 8 9 10 11 |
# File 'app/services/event_api_listener.rb', line 6 def initialize(application, event_category, event_name) @application = application @event_category = event_category @event_name = event_name Kernel.at_exit { unlisten } end |
Class Method Details
.call(*args) ⇒ Object
116 117 118 |
# File 'app/services/event_api_listener.rb', line 116 def call(*args) new(*args).call end |
Instance Method Details
#call ⇒ Object
13 14 15 16 |
# File 'app/services/event_api_listener.rb', line 13 def call consumer # Eager load consumer to early detect errors. listen end |