Class: Controls::Event
- Inherits:
-
Dish::Plate
- Object
- Dish::Plate
- Controls::Event
- Defined in:
- lib/controls/objects/event.rb
Overview
A representation of the Event resource
Instance Method Summary collapse
-
#inspect ⇒ String
Overrides #inspect to use the proper event type.
-
#payload ⇒ Controls::SecurityControlChangeEventPayload, ...
Coerces the payload into the appropriate type.
-
#to_s ⇒ string
Returns the event type.
Instance Method Details
#inspect ⇒ String
Overrides #inspect to use the proper event type
18 19 20 |
# File 'lib/controls/objects/event.rb', line 18 def inspect super.sub('Event', type) end |
#payload ⇒ Controls::SecurityControlChangeEventPayload, ...
Coerces the payload into the appropriate type
10 11 12 13 |
# File 'lib/controls/objects/event.rb', line 10 def payload value = _get_value('payload') Dish(value, Controls.const_get("#{type}Payload")) end |
#to_s ⇒ string
Returns the event type
- todo
-
is the type all we want to return?
-
27 28 29 |
# File 'lib/controls/objects/event.rb', line 27 def to_s type end |