Class: DjiMqttConnect::Thing::Product::StateMarshal
- Inherits:
-
MessageMarshal
- Object
- MessageMarshal
- DjiMqttConnect::Thing::Product::StateMarshal
- Includes:
- Utils::MessageParsing
- Defined in:
- lib/dji_mqtt_connect/marshals/thing/product/state_marshal.rb
Defined Under Namespace
Classes: StateTransformer
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
22 23 24 25 26 27 28 29 30 31 |
# File 'lib/dji_mqtt_connect/marshals/thing/product/state_marshal.rb', line 22 def load() # Parse the message from JSON = parse_json() # Transform the message = state_transformer.call() # Build an instance of the class, or a generic message from the current class (StateMessage, ) end |