Class: DjiMqttConnect::Thing::Product::EventsMarshal
- Inherits:
-
MessageMarshal
- Object
- MessageMarshal
- DjiMqttConnect::Thing::Product::EventsMarshal
- Includes:
- Utils::MessageParsing
- Defined in:
- lib/dji_mqtt_connect/marshals/thing/product/events_marshal.rb
Defined Under Namespace
Classes: EventsTransformer
Instance Method Summary collapse
-
#load(raw_message) ⇒ Object
Attempts to look a the method attribute, and builds a specific Message class for the message.
Methods inherited from MessageMarshal
Instance Method Details
#load(raw_message) ⇒ Object
Attempts to look a the method attribute, and builds a specific Message class for the message
70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/dji_mqtt_connect/marshals/thing/product/events_marshal.rb', line 70 def load() # Parse the message from JSON = parse_json() # Transform the message = events_transformer.call() = ["_method"] # Build an instance of the class, or a generic message from the current class = (, EventsMessage) (, ) end |