Class: Databox::Messages
- Inherits:
-
Integration
- Object
- Client
- Integration
- Databox::Messages
- Defined in:
- lib/databox/integration.rb
Instance Attribute Summary
Attributes inherited from Integration
#date, #list, #name, #set_item
Attributes inherited from Client
Instance Method Summary collapse
Methods inherited from Integration
Methods inherited from Client
#handle, #initialize, #key, #logs, #push, #url, #validate
Constructor Details
This class inherits a constructor from Databox::Integration
Instance Method Details
#add(message, icon) ⇒ Object
30 31 32 |
# File 'lib/databox/integration.rb', line 30 def add , icon @list.push [, icon] end |
#to_data ⇒ Object
34 35 36 37 38 39 |
# File 'lib/databox/integration.rb', line 34 def to_data [ { key: "#{name}", value: list.map(&:first) }, { key: "#{name}@icons", value: list.map{|e| e[1] } }, ] end |