Class: SimpleMeasurement
- Inherits:
-
Measurement
- Object
- Measurement
- SimpleMeasurement
- Defined in:
- lib/wattics-api-client/measurements.rb
Instance Attribute Summary collapse
-
#value ⇒ Object
Returns the value of attribute value.
Attributes inherited from Measurement
Instance Method Summary collapse
Methods inherited from Measurement
Instance Attribute Details
#value ⇒ Object
Returns the value of attribute value.
18 19 20 |
# File 'lib/wattics-api-client/measurements.rb', line 18 def value @value end |
Instance Method Details
#json ⇒ Object
28 29 30 31 32 33 34 |
# File 'lib/wattics-api-client/measurements.rb', line 28 def json { id: @id.to_s, tsISO8601: @timestamp, value: @value }.select { |_k, v| v }.to_json end |
#to_s ⇒ Object
20 21 22 23 24 25 26 |
# File 'lib/wattics-api-client/measurements.rb', line 20 def to_s 'SimpleMeasurement{' \ "id='" + @id.to_s + '\'' \ ', timestamp=' + @timestamp.to_s + ', value=' + @value.to_s + '}' end |