Class: Kakaxi::Data::BaseData
- Inherits:
-
Object
- Object
- Kakaxi::Data::BaseData
- Defined in:
- lib/kakaxi/data/base_data.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#interpolation ⇒ Object
readonly
Returns the value of attribute interpolation.
-
#recorded_at ⇒ Object
readonly
Returns the value of attribute recorded_at.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(value: nil, recorded_at: nil, interpolation: nil) ⇒ BaseData
constructor
A new instance of BaseData.
Constructor Details
#initialize(value: nil, recorded_at: nil, interpolation: nil) ⇒ BaseData
Returns a new instance of BaseData.
6 7 8 9 10 |
# File 'lib/kakaxi/data/base_data.rb', line 6 def initialize(value: nil, recorded_at: nil, interpolation: nil) @value = value @recorded_at = DateTime.strptime(recorded_at, '%Y-%m-%dT%H:%M:%SZ') @interpolation = interpolation end |
Instance Attribute Details
#interpolation ⇒ Object (readonly)
Returns the value of attribute interpolation.
4 5 6 |
# File 'lib/kakaxi/data/base_data.rb', line 4 def interpolation @interpolation end |
#recorded_at ⇒ Object (readonly)
Returns the value of attribute recorded_at.
4 5 6 |
# File 'lib/kakaxi/data/base_data.rb', line 4 def recorded_at @recorded_at end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
4 5 6 |
# File 'lib/kakaxi/data/base_data.rb', line 4 def value @value end |