Class: Databox::Progress
- Inherits:
-
Integration
- Object
- Client
- Integration
- Databox::Progress
- 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(*args) ⇒ Object
72 73 74 |
# File 'lib/databox/integration.rb', line 72 def add *args raise "Progress does not support add!" end |
#set(message, max, value) ⇒ Object
76 77 78 |
# File 'lib/databox/integration.rb', line 76 def set , max, value @set_item = [, max, value] end |
#to_data ⇒ Object
80 81 82 83 84 85 86 |
# File 'lib/databox/integration.rb', line 80 def to_data [ { key: "#{name}@label", value: @set_item.first }, { key: "#{name}@max_value", value: @set_item[1] }, { key: "#{name}", value: @set_item.last }, ] end |