Class: Kakaxi::Data::BaseData

Inherits:
Object
  • Object
show all
Defined in:
lib/kakaxi/data/base_data.rb

Direct Known Subclasses

Humidity, Rainfall, SolarRadiation, Temperature

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#interpolationObject (readonly)

Returns the value of attribute interpolation.



4
5
6
# File 'lib/kakaxi/data/base_data.rb', line 4

def interpolation
  @interpolation
end

#recorded_atObject (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

#valueObject (readonly)

Returns the value of attribute value.



4
5
6
# File 'lib/kakaxi/data/base_data.rb', line 4

def value
  @value
end