Class: GoogleWeather::Forecast
- Inherits:
-
Object
- Object
- GoogleWeather::Forecast
- Defined in:
- lib/gwx/forecast_conditions.rb
Instance Attribute Summary collapse
-
#condition ⇒ Object
Returns the value of attribute condition.
-
#day_of_week ⇒ Object
Returns the value of attribute day_of_week.
-
#forecast_conditions ⇒ Object
Returns the value of attribute forecast_conditions.
-
#high ⇒ Object
Returns the value of attribute high.
-
#icon ⇒ Object
Returns the value of attribute icon.
-
#low ⇒ Object
Returns the value of attribute low.
Instance Method Summary collapse
-
#initialize(wx, day) ⇒ Forecast
constructor
A new instance of Forecast.
Constructor Details
#initialize(wx, day) ⇒ Forecast
Returns a new instance of Forecast.
4 5 6 |
# File 'lib/gwx/forecast_conditions.rb', line 4 def initialize(wx, day) @forecast_conditions = wx["forecast_conditions"][day] end |
Instance Attribute Details
#condition ⇒ Object
Returns the value of attribute condition.
2 3 4 |
# File 'lib/gwx/forecast_conditions.rb', line 2 def condition @condition end |
#day_of_week ⇒ Object
Returns the value of attribute day_of_week.
2 3 4 |
# File 'lib/gwx/forecast_conditions.rb', line 2 def day_of_week @day_of_week end |
#forecast_conditions ⇒ Object
Returns the value of attribute forecast_conditions.
2 3 4 |
# File 'lib/gwx/forecast_conditions.rb', line 2 def forecast_conditions @forecast_conditions end |
#high ⇒ Object
Returns the value of attribute high.
2 3 4 |
# File 'lib/gwx/forecast_conditions.rb', line 2 def high @high end |
#icon ⇒ Object
Returns the value of attribute icon.
2 3 4 |
# File 'lib/gwx/forecast_conditions.rb', line 2 def icon @icon end |
#low ⇒ Object
Returns the value of attribute low.
2 3 4 |
# File 'lib/gwx/forecast_conditions.rb', line 2 def low @low end |