Class: Helium::DataPoint
- Inherits:
-
Object
- Object
- Helium::DataPoint
- Defined in:
- lib/helium/data_point.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
-
#port ⇒ Object
Returns the value of attribute port.
-
#timestamp ⇒ Object
Returns the value of attribute timestamp.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(client:, params:) ⇒ DataPoint
constructor
A new instance of DataPoint.
Constructor Details
#initialize(client:, params:) ⇒ DataPoint
Returns a new instance of DataPoint.
5 6 7 8 9 10 11 |
# File 'lib/helium/data_point.rb', line 5 def initialize(client:, params:) @client = client @id = params["id"] @timestamp = params["attributes"]["timestamp"] @value = params["attributes"]["value"] @port = params["attributes"]["port"] end |
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
3 4 5 |
# File 'lib/helium/data_point.rb', line 3 def id @id end |
#port ⇒ Object
Returns the value of attribute port.
3 4 5 |
# File 'lib/helium/data_point.rb', line 3 def port @port end |
#timestamp ⇒ Object
Returns the value of attribute timestamp.
3 4 5 |
# File 'lib/helium/data_point.rb', line 3 def @timestamp end |
#value ⇒ Object
Returns the value of attribute value.
3 4 5 |
# File 'lib/helium/data_point.rb', line 3 def value @value end |