Class: MeteofranceApi::Weather::DailyForecast

Inherits:
Object
  • Object
show all
Defined in:
lib/meteofrance_api/models/weather/daily_forecast.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ DailyForecast

Returns a new instance of DailyForecast.



21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/meteofrance_api/models/weather/daily_forecast.rb', line 21

def initialize(data)
  @time = Time.parse(data["time"])
  @temperature_max = data["T_max"]
  @temperature_min = data["T_min"]
  @temperature_sea = data["T_sea"]
  @relative_humidity_max = data["relative_humidity_max"]
  @relative_humidity_min = data["relative_humidity_min"]
  @weather_description = data["daily_weather_description"]
  @weather_icon = data["daily_weather_icon"]
  @sunrise_time = Time.parse(data["sunrise_time"])
  @sunset_time = Time.parse(data["sunset_time"])
  @total_precipitation_24h = data["total_precipitation_24h"]
  @uv_index = data["uv_index"]
end

Instance Attribute Details

#daily_weather_descriptionObject (readonly)

Returns the value of attribute daily_weather_description.



11
12
13
# File 'lib/meteofrance_api/models/weather/daily_forecast.rb', line 11

def daily_weather_description
  @daily_weather_description
end

#daily_weather_iconObject (readonly)

Returns the value of attribute daily_weather_icon.



12
13
14
# File 'lib/meteofrance_api/models/weather/daily_forecast.rb', line 12

def daily_weather_icon
  @daily_weather_icon
end

#relative_humidity_maxObject (readonly)

Returns the value of attribute relative_humidity_max.



8
9
10
# File 'lib/meteofrance_api/models/weather/daily_forecast.rb', line 8

def relative_humidity_max
  @relative_humidity_max
end

#relative_humidity_minObject (readonly)

Returns the value of attribute relative_humidity_min.



9
10
11
# File 'lib/meteofrance_api/models/weather/daily_forecast.rb', line 9

def relative_humidity_min
  @relative_humidity_min
end

#sunrise_timeObject (readonly)

Returns the value of attribute sunrise_time.



14
15
16
# File 'lib/meteofrance_api/models/weather/daily_forecast.rb', line 14

def sunrise_time
  @sunrise_time
end

#sunset_timeObject (readonly)

Returns the value of attribute sunset_time.



15
16
17
# File 'lib/meteofrance_api/models/weather/daily_forecast.rb', line 15

def sunset_time
  @sunset_time
end

#T_maxObject (readonly)

Returns the value of attribute T_max.



4
5
6
# File 'lib/meteofrance_api/models/weather/daily_forecast.rb', line 4

def T_max
  @T_max
end

#T_minObject (readonly)

Returns the value of attribute T_min.



5
6
7
# File 'lib/meteofrance_api/models/weather/daily_forecast.rb', line 5

def T_min
  @T_min
end

#T_seaObject (readonly)

Returns the value of attribute T_sea.



6
7
8
# File 'lib/meteofrance_api/models/weather/daily_forecast.rb', line 6

def T_sea
  @T_sea
end

#timeObject (readonly)

Returns the value of attribute time.



2
3
4
# File 'lib/meteofrance_api/models/weather/daily_forecast.rb', line 2

def time
  @time
end

#total_precipitation_24hObject (readonly)

Returns the value of attribute total_precipitation_24h.



17
18
19
# File 'lib/meteofrance_api/models/weather/daily_forecast.rb', line 17

def total_precipitation_24h
  @total_precipitation_24h
end

#uv_indexObject (readonly)

Returns the value of attribute uv_index.



19
20
21
# File 'lib/meteofrance_api/models/weather/daily_forecast.rb', line 19

def uv_index
  @uv_index
end