Class: Ubidots::Variable
- Inherits:
-
Object
- Object
- Ubidots::Variable
- Defined in:
- lib/ubidots/variable.rb
Instance Attribute Summary collapse
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#icon ⇒ Object
readonly
Returns the value of attribute icon.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#last_activity ⇒ Object
readonly
Returns the value of attribute last_activity.
-
#last_value ⇒ Object
readonly
Returns the value of attribute last_value.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#properties ⇒ Object
readonly
Returns the value of attribute properties.
-
#raw_datasource ⇒ Object
readonly
Returns the value of attribute raw_datasource.
-
#tags ⇒ Object
readonly
Returns the value of attribute tags.
-
#unit ⇒ Object
readonly
Returns the value of attribute unit.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
-
#values_url ⇒ Object
readonly
Returns the value of attribute values_url.
Instance Method Summary collapse
-
#initialize(data) ⇒ Variable
constructor
A new instance of Variable.
Constructor Details
#initialize(data) ⇒ Variable
Returns a new instance of Variable.
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/ubidots/variable.rb', line 9 def initialize(data) @id = data["id"] @name = data["name"] @url = data["url"] @last_activity = data["last_activity"] @tags = data["tags"] @description = data["description"] @created_at = data["created_at"] @icon = data["icon"] @unit = data["unit"] @raw_datasource = data["datasource"] @properties = data["properties"] @values_url = data["values_url"] @last_value = data["last_value"] end |
Instance Attribute Details
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
6 7 8 |
# File 'lib/ubidots/variable.rb', line 6 def created_at @created_at end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
6 7 8 |
# File 'lib/ubidots/variable.rb', line 6 def description @description end |
#icon ⇒ Object (readonly)
Returns the value of attribute icon.
7 8 9 |
# File 'lib/ubidots/variable.rb', line 7 def icon @icon end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
6 7 8 |
# File 'lib/ubidots/variable.rb', line 6 def id @id end |
#last_activity ⇒ Object (readonly)
Returns the value of attribute last_activity.
6 7 8 |
# File 'lib/ubidots/variable.rb', line 6 def last_activity @last_activity end |
#last_value ⇒ Object (readonly)
Returns the value of attribute last_value.
7 8 9 |
# File 'lib/ubidots/variable.rb', line 7 def last_value @last_value end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
6 7 8 |
# File 'lib/ubidots/variable.rb', line 6 def name @name end |
#properties ⇒ Object (readonly)
Returns the value of attribute properties.
7 8 9 |
# File 'lib/ubidots/variable.rb', line 7 def properties @properties end |
#raw_datasource ⇒ Object (readonly)
Returns the value of attribute raw_datasource.
7 8 9 |
# File 'lib/ubidots/variable.rb', line 7 def raw_datasource @raw_datasource end |
#tags ⇒ Object (readonly)
Returns the value of attribute tags.
6 7 8 |
# File 'lib/ubidots/variable.rb', line 6 def @tags end |
#unit ⇒ Object (readonly)
Returns the value of attribute unit.
7 8 9 |
# File 'lib/ubidots/variable.rb', line 7 def unit @unit end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
6 7 8 |
# File 'lib/ubidots/variable.rb', line 6 def url @url end |
#values_url ⇒ Object (readonly)
Returns the value of attribute values_url.
7 8 9 |
# File 'lib/ubidots/variable.rb', line 7 def values_url @values_url end |