lib/databox/integration.rb in databox-0.1.1 vs lib/databox/integration.rb in databox-0.1.2

- old
+ new

@@ -23,18 +23,20 @@ end end end -#TODO: Add support for icons class Databox::Messages < Databox::Integration - def add message - @list.push message + def add message, icon + @list.push [message, icon] end def to_data - { key: "#{name}", value: list } + [ + { key: "#{name}", value: list.map(&:first) }, + { key: "#{name}@icons", value: list.map{|e| e[1] } }, + ] end end #TODO: Add support for icons