Class: NBS::DataPoint
- Inherits:
-
Object
- Object
- NBS::DataPoint
- Defined in:
- lib/next-big-sound/datapoint.rb
Instance Attribute Summary collapse
-
#time ⇒ Object
Returns the value of attribute time.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(time, value) ⇒ DataPoint
constructor
A new instance of DataPoint.
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
#time ⇒ Object
Returns the value of attribute time.
4 5 6 |
# File 'lib/next-big-sound/datapoint.rb', line 4 def time @time end |
#value ⇒ Object
Returns the value of attribute value.
4 5 6 |
# File 'lib/next-big-sound/datapoint.rb', line 4 def value @value end |