Sha256: ade4d31e3324c26b613fc0f59a74d554fc6e2cc5a7b55ff292197fb080a63e55
Contents?: true
Size: 973 Bytes
Versions: 5
Compression:
Stored size: 973 Bytes
Contents
# frozen_string_literal: true module DjiMqttConnect module Thing::Product class RequestsMessage < DjiMqttConnect::Message attribute :tid, Types::UUID attribute :bid, Types::UUID attribute :timestamp, Types::Timestamp # Can be determined from the topic, but included for convenience attribute? :gateway, Types::SerialNumber attribute :_data, Types::Hash attribute :_method, Types::String attribute :data, Types::Hash.default({}.freeze) def humanized_summary Translations.thing_product_requests_summary(_method, **humanized_summary_interpolation) end def humanized_summary_interpolation data.to_h.merge(method: _method) end # All the flight IDs in the message def flight_ids [] end def to_s # Include data method for Generic messages instance_of?(RequestsMessage) ? "#{super}[#{_method}]" : super end end end end
Version data entries
5 entries across 5 versions & 1 rubygems