Class: DjiMqttConnect::Thing::Product::FlightAreasGetRequestsReplyMessage
Overview
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Message
current_timestamp, generate_bid, generate_tid, #to_s
Class Method Details
.build_for(flight_areas_get, files:, result: 0) ⇒ Object
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
# File 'lib/dji_mqtt_connect/messages/thing/product/requests_reply/flight_areas_get.rb', line 7
def self.build_for(flight_areas_get, files:, result: 0)
new(
_method: flight_areas_get._method,
data: {
result: result,
output: {
files: files
}
},
tid: flight_areas_get.tid,
bid: flight_areas_get.bid,
timestamp: current_timestamp
)
end
|
Instance Method Details
#humanized_summary ⇒ Object
43
44
45
46
47
48
49
50
|
# File 'lib/dji_mqtt_connect/messages/thing/product/requests_reply/flight_areas_get.rb', line 43
def humanized_summary
return super if data.output.files.none?
Translations.thing_product_requests_reply_summary(
"#{_method}_with_files",
**humanized_summary_interpolation
)
end
|
#humanized_summary_interpolation ⇒ Object
52
53
54
55
56
|
# File 'lib/dji_mqtt_connect/messages/thing/product/requests_reply/flight_areas_get.rb', line 52
def humanized_summary_interpolation
super.merge(
files: data.output.files.map(&:humanized_summary).join(", ")
)
end
|