class DataPoint
Attributes
data[R]
timestamp[R]
Public Class Methods
new(timestamp, data)
click to toggle source
# File lib/time_series/data_point.rb, line 6 def initialize(timestamp, data) timestamp = timestamp.to_time unless timestamp.kind_of? Time @timestamp, @data = timestamp, data end
Public Instance Methods
<=>(another)
click to toggle source
# File lib/time_series/data_point.rb, line 11 def <=>(another) result = @timestamp <=> another.timestamp end
==(another)
click to toggle source
# File lib/time_series/data_point.rb, line 15 def ==(another) @timestamp == another.timestamp and @data == another.data end