class SimpleMeasurement

Attributes

value[RW]

Public Instance Methods

json() click to toggle source
# 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() click to toggle source
# 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