Class: MeteofranceApi::Weather::Forecast
- Inherits:
-
Object
- Object
- MeteofranceApi::Weather::Forecast
- Defined in:
- lib/meteofrance_api/models/weather/forecast.rb
Instance Attribute Summary collapse
-
#iso0 ⇒ Object
readonly
Returns the value of attribute iso0.
-
#P_sea ⇒ Object
readonly
Returns the value of attribute P_sea.
-
#rain_12h ⇒ Object
readonly
Returns the value of attribute rain_12h.
-
#rain_1h ⇒ Object
readonly
Returns the value of attribute rain_1h.
-
#rain_24h ⇒ Object
readonly
Returns the value of attribute rain_24h.
-
#rain_3h ⇒ Object
readonly
Returns the value of attribute rain_3h.
-
#rain_6h ⇒ Object
readonly
Returns the value of attribute rain_6h.
-
#rain_snow_limit ⇒ Object
readonly
Returns the value of attribute rain_snow_limit.
-
#relative_humidity ⇒ Object
readonly
Returns the value of attribute relative_humidity.
-
#snow_12h ⇒ Object
readonly
Returns the value of attribute snow_12h.
-
#snow_1h ⇒ Object
readonly
Returns the value of attribute snow_1h.
-
#snow_24h ⇒ Object
readonly
Returns the value of attribute snow_24h.
-
#snow_3h ⇒ Object
readonly
Returns the value of attribute snow_3h.
-
#snow_6h ⇒ Object
readonly
Returns the value of attribute snow_6h.
-
#temperature ⇒ Object
readonly
Returns the value of attribute temperature.
-
#temperature_windchill ⇒ Object
readonly
Returns the value of attribute temperature_windchill.
-
#time ⇒ Object
readonly
Returns the value of attribute time.
-
#total_cloud_cover ⇒ Object
readonly
Returns the value of attribute total_cloud_cover.
-
#weather_description ⇒ Object
readonly
Returns the value of attribute weather_description.
-
#weather_icon ⇒ Object
readonly
Returns the value of attribute weather_icon.
-
#wind_direction ⇒ Object
readonly
Returns the value of attribute wind_direction.
-
#wind_icon ⇒ Object
readonly
Returns the value of attribute wind_icon.
-
#wind_speed ⇒ Object
readonly
Returns the value of attribute wind_speed.
-
#wind_speed_gust ⇒ Object
readonly
Returns the value of attribute wind_speed_gust.
Instance Method Summary collapse
-
#initialize(data) ⇒ Forecast
constructor
A new instance of Forecast.
Constructor Details
#initialize(data) ⇒ Forecast
Returns a new instance of Forecast.
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/meteofrance_api/models/weather/forecast.rb', line 37 def initialize(data) @time = Time.parse(data["time"]) @temperature = data["T"] @temperature_windchill = data["T_windchill"] @relative_humidity = data["relative_humidity"] @P_sea = data["P_sea"] @wind_speed = data["wind_speed"] @wind_speed_gust = data["wind_speed_gust"] @wind_direction = data["wind_direction"] @wind_icon = data["wind_icon"] @rain_1h = data["rain_1h"] @rain_3h = data["rain_3h"] @rain_6h = data["rain_6h"] @rain_12h = data["rain_12h"] @rain_24h = data["rain_24h"] @snow_1h = data["snow_1h"] @snow_3h = data["snow_3h"] @snow_6h = data["snow_6h"] @snow_12h = data["snow_12h"] @snow_24h = data["snow_24h"] @iso0 = data["iso0"] @rain_snow_limit = data["rain_snow_limit"] @total_cloud_cover = data["total_cloud_cover"] @weather_icon = data["weather_icon"] @weather_description = data["weather_description"] end |
Instance Attribute Details
#iso0 ⇒ Object (readonly)
Returns the value of attribute iso0.
34 35 36 |
# File 'lib/meteofrance_api/models/weather/forecast.rb', line 34 def iso0 @iso0 end |
#P_sea ⇒ Object (readonly)
Returns the value of attribute P_sea.
32 33 34 |
# File 'lib/meteofrance_api/models/weather/forecast.rb', line 32 def P_sea @P_sea end |
#rain_12h ⇒ Object (readonly)
Returns the value of attribute rain_12h.
21 22 23 |
# File 'lib/meteofrance_api/models/weather/forecast.rb', line 21 def rain_12h @rain_12h end |
#rain_1h ⇒ Object (readonly)
Returns the value of attribute rain_1h.
18 19 20 |
# File 'lib/meteofrance_api/models/weather/forecast.rb', line 18 def rain_1h @rain_1h end |
#rain_24h ⇒ Object (readonly)
Returns the value of attribute rain_24h.
22 23 24 |
# File 'lib/meteofrance_api/models/weather/forecast.rb', line 22 def rain_24h @rain_24h end |
#rain_3h ⇒ Object (readonly)
Returns the value of attribute rain_3h.
19 20 21 |
# File 'lib/meteofrance_api/models/weather/forecast.rb', line 19 def rain_3h @rain_3h end |
#rain_6h ⇒ Object (readonly)
Returns the value of attribute rain_6h.
20 21 22 |
# File 'lib/meteofrance_api/models/weather/forecast.rb', line 20 def rain_6h @rain_6h end |
#rain_snow_limit ⇒ Object (readonly)
Returns the value of attribute rain_snow_limit.
24 25 26 |
# File 'lib/meteofrance_api/models/weather/forecast.rb', line 24 def rain_snow_limit @rain_snow_limit end |
#relative_humidity ⇒ Object (readonly)
Returns the value of attribute relative_humidity.
6 7 8 |
# File 'lib/meteofrance_api/models/weather/forecast.rb', line 6 def relative_humidity @relative_humidity end |
#snow_12h ⇒ Object (readonly)
Returns the value of attribute snow_12h.
29 30 31 |
# File 'lib/meteofrance_api/models/weather/forecast.rb', line 29 def snow_12h @snow_12h end |
#snow_1h ⇒ Object (readonly)
Returns the value of attribute snow_1h.
26 27 28 |
# File 'lib/meteofrance_api/models/weather/forecast.rb', line 26 def snow_1h @snow_1h end |
#snow_24h ⇒ Object (readonly)
Returns the value of attribute snow_24h.
30 31 32 |
# File 'lib/meteofrance_api/models/weather/forecast.rb', line 30 def snow_24h @snow_24h end |
#snow_3h ⇒ Object (readonly)
Returns the value of attribute snow_3h.
27 28 29 |
# File 'lib/meteofrance_api/models/weather/forecast.rb', line 27 def snow_3h @snow_3h end |
#snow_6h ⇒ Object (readonly)
Returns the value of attribute snow_6h.
28 29 30 |
# File 'lib/meteofrance_api/models/weather/forecast.rb', line 28 def snow_6h @snow_6h end |
#temperature ⇒ Object (readonly)
Returns the value of attribute temperature.
4 5 6 |
# File 'lib/meteofrance_api/models/weather/forecast.rb', line 4 def temperature @temperature end |
#temperature_windchill ⇒ Object (readonly)
Returns the value of attribute temperature_windchill.
5 6 7 |
# File 'lib/meteofrance_api/models/weather/forecast.rb', line 5 def temperature_windchill @temperature_windchill end |
#time ⇒ Object (readonly)
Returns the value of attribute time.
2 3 4 |
# File 'lib/meteofrance_api/models/weather/forecast.rb', line 2 def time @time end |
#total_cloud_cover ⇒ Object (readonly)
Returns the value of attribute total_cloud_cover.
8 9 10 |
# File 'lib/meteofrance_api/models/weather/forecast.rb', line 8 def total_cloud_cover @total_cloud_cover end |
#weather_description ⇒ Object (readonly)
Returns the value of attribute weather_description.
10 11 12 |
# File 'lib/meteofrance_api/models/weather/forecast.rb', line 10 def weather_description @weather_description end |
#weather_icon ⇒ Object (readonly)
Returns the value of attribute weather_icon.
11 12 13 |
# File 'lib/meteofrance_api/models/weather/forecast.rb', line 11 def weather_icon @weather_icon end |
#wind_direction ⇒ Object (readonly)
Returns the value of attribute wind_direction.
13 14 15 |
# File 'lib/meteofrance_api/models/weather/forecast.rb', line 13 def wind_direction @wind_direction end |
#wind_icon ⇒ Object (readonly)
Returns the value of attribute wind_icon.
14 15 16 |
# File 'lib/meteofrance_api/models/weather/forecast.rb', line 14 def wind_icon @wind_icon end |
#wind_speed ⇒ Object (readonly)
Returns the value of attribute wind_speed.
15 16 17 |
# File 'lib/meteofrance_api/models/weather/forecast.rb', line 15 def wind_speed @wind_speed end |
#wind_speed_gust ⇒ Object (readonly)
Returns the value of attribute wind_speed_gust.
16 17 18 |
# File 'lib/meteofrance_api/models/weather/forecast.rb', line 16 def wind_speed_gust @wind_speed_gust end |