class Fabricio::Model::Point

This model represents a data point with two fields - timestamp and value

Attributes

date[R]
value[R]

Public Class Methods

new(attributes) click to toggle source

Returns a data point with two fields - timestamp and value

@param attributes [Hash] @return [Fabricio::Model::Point]

# File lib/fabricio/models/point.rb, line 11
def initialize(attributes)
  @date = DateTime.strptime(attributes.first.to_s,'%s')
  @value = attributes.last
end