Class: DjiMqttConnect::Thing::Product::EventsReplyMessage
- Inherits:
-
Message
- Object
- Dry::Struct
- Message
- DjiMqttConnect::Thing::Product::EventsReplyMessage
- Defined in:
- lib/dji_mqtt_connect/messages/thing/product/events_reply_message.rb
Overview
Class Method Summary collapse
-
.build_for(events_message, result: 0) ⇒ Object
a result of 0 means we approve of this action.
Instance Method Summary collapse
Methods inherited from Message
current_timestamp, generate_bid, generate_tid, #to_s
Class Method Details
.build_for(events_message, result: 0) ⇒ Object
a result of 0 means we approve of this action
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/dji_mqtt_connect/messages/thing/product/events_reply_message.rb', line 8 def self.build_for(, result: 0) new( _method: ._method, tid: .tid, bid: .bid, timestamp: , data: { result: result } ) end |
Instance Method Details
#humanized_summary ⇒ Object
35 36 37 |
# File 'lib/dji_mqtt_connect/messages/thing/product/events_reply_message.rb', line 35 def humanized_summary Translations.thing_product_events_reply_summary(_method, **humanized_summary_interpolation) end |
#humanized_summary_interpolation ⇒ Object
39 40 41 |
# File 'lib/dji_mqtt_connect/messages/thing/product/events_reply_message.rb', line 39 def humanized_summary_interpolation data.to_h.merge(method: _method) end |