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