Class: Databox::Integration
Instance Attribute Summary collapse
-
#date ⇒ Object
Returns the value of attribute date.
-
#list ⇒ Object
Returns the value of attribute list.
-
#name ⇒ Object
Returns the value of attribute name.
-
#set_item ⇒ Object
Returns the value of attribute set_item.
Attributes inherited from Client
Instance Method Summary collapse
-
#initialize(name, options = {date: nil, id: nil}) ⇒ Integration
constructor
A new instance of Integration.
- #save ⇒ Object
Methods inherited from Client
#handle, #key, #logs, #push, #url, #validate
Constructor Details
#initialize(name, options = {date: nil, id: nil}) ⇒ Integration
Returns a new instance of Integration.
5 6 7 8 9 10 11 12 13 14 |
# File 'lib/databox/integration.rb', line 5 def initialize name, ={date: nil, id: nil} super() @name = name @date = [:date] unless [:date].nil? @token = [:id] unless [:id].nil? @list = [] @set_item = nil end |
Instance Attribute Details
#date ⇒ Object
Returns the value of attribute date.
3 4 5 |
# File 'lib/databox/integration.rb', line 3 def date @date end |
#list ⇒ Object
Returns the value of attribute list.
3 4 5 |
# File 'lib/databox/integration.rb', line 3 def list @list end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/databox/integration.rb', line 3 def name @name end |
#set_item ⇒ Object
Returns the value of attribute set_item.
3 4 5 |
# File 'lib/databox/integration.rb', line 3 def set_item @set_item end |
Instance Method Details
#save ⇒ Object
16 17 18 19 20 21 22 23 24 |
# File 'lib/databox/integration.rb', line 16 def save if push(to_data).success? @list = [] @set_item = nil true else false end end |