Class: OpenWeather::Models::Stations::Measurement

Inherits:
Model
  • Object
show all
Defined in:
lib/open_weather/models/stations/measurement.rb

Instance Attribute Summary

Attributes inherited from Model

#options

Instance Method Summary collapse

Methods inherited from Model

#units

Constructor Details

#initialize(args = nil, options = {}) ⇒ Measurement

Returns a new instance of Measurement.



16
17
18
19
20
21
22
23
# File 'lib/open_weather/models/stations/measurement.rb', line 16

def initialize(args = nil, options = {})
  super args, options

  self.temp = OpenWeather::Models::Stations::Temp.new(temp, options) if temp
  self.humidity = OpenWeather::Models::Stations::Humidity.new(humidity, options) if humidity
  self.pressure = OpenWeather::Models::Stations::Pressure.new(pressure, options) if pressure
  self.precipitation = OpenWeather::Models::Stations::Precipitation.new(precipitation, options) if precipitation
end