Class: NBS::DataPoint

Inherits:
Object
  • Object
show all
Defined in:
lib/next-big-sound/datapoint.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(time, value) ⇒ DataPoint

Returns a new instance of DataPoint.



6
7
8
9
# File 'lib/next-big-sound/datapoint.rb', line 6

def initialize(time,value)
  self.time = DateTime.parse(time.to_s)
  self.value = value.to_f
end

Instance Attribute Details

#timeObject

Returns the value of attribute time.



4
5
6
# File 'lib/next-big-sound/datapoint.rb', line 4

def time
  @time
end

#valueObject

Returns the value of attribute value.



4
5
6
# File 'lib/next-big-sound/datapoint.rb', line 4

def value
  @value
end