Class: Cliqr::Events::Handler Private
- Inherits:
-
Object
- Object
- Cliqr::Events::Handler
- Defined in:
- lib/cliqr/events/handler.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Event handler that all event handlers come from
Instance Method Summary collapse
-
#handle(*_args) ⇒ Nothing
private
Handle a incoming event needs to be implemented in a subclass.
-
#initialize(context) ⇒ Handler
constructor
private
Create a instance of event handler.
-
#invoke(*args) ⇒ Boolean
private
Invoker another event.
Constructor Details
#initialize(context) ⇒ Handler
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Create a instance of event handler
11 12 13 |
# File 'lib/cliqr/events/handler.rb', line 11 def initialize(context) @context = context end |
Instance Method Details
#handle(*_args) ⇒ Nothing
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Handle a incoming event needs to be implemented in a subclass
20 21 22 |
# File 'lib/cliqr/events/handler.rb', line 20 def handle(*_args) fail Cliqr::Error::InvocationError, 'handle method not implemented by handler class' end |
#invoke(*args) ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Invoker another event
27 28 29 |
# File 'lib/cliqr/events/handler.rb', line 27 def invoke(*args) @context.invoke(*args) end |