Class: SardonyxRing::Events::ActionEvent
- Inherits:
-
Object
- Object
- SardonyxRing::Events::ActionEvent
- Defined in:
- lib/sardonyx_ring/events/action_event.rb
Instance Attribute Summary collapse
-
#current_action ⇒ Object
readonly
Returns the value of attribute current_action.
-
#raw_payload ⇒ Object
readonly
Returns the value of attribute raw_payload.
Instance Method Summary collapse
-
#initialize(raw_payload, current_action) ⇒ ActionEvent
constructor
A new instance of ActionEvent.
- #method_missing(method, *args) ⇒ Object
- #respond_to_missing?(symbol, include_private) ⇒ Boolean
Constructor Details
#initialize(raw_payload, current_action) ⇒ ActionEvent
Returns a new instance of ActionEvent.
6 7 8 9 |
# File 'lib/sardonyx_ring/events/action_event.rb', line 6 def initialize(raw_payload, current_action) @raw_payload = raw_payload @current_action = current_action end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args) ⇒ Object
19 20 21 22 23 |
# File 'lib/sardonyx_ring/events/action_event.rb', line 19 def method_missing(method, *args) return raw_payload.event.send(method, *args) if raw_payload.event.respond_to?(method) super end |
Instance Attribute Details
#current_action ⇒ Object (readonly)
Returns the value of attribute current_action.
11 12 13 |
# File 'lib/sardonyx_ring/events/action_event.rb', line 11 def current_action @current_action end |
#raw_payload ⇒ Object (readonly)
Returns the value of attribute raw_payload.
11 12 13 |
# File 'lib/sardonyx_ring/events/action_event.rb', line 11 def raw_payload @raw_payload end |
Instance Method Details
#respond_to_missing?(symbol, include_private) ⇒ Boolean
13 14 15 16 17 |
# File 'lib/sardonyx_ring/events/action_event.rb', line 13 def respond_to_missing?(symbol, include_private) return true if raw_payload.event.respond_to?(symbol) super end |