Class: GoogleWeather::Information
- Inherits:
-
Object
- Object
- GoogleWeather::Information
- Defined in:
- lib/gwx/forecast_information.rb
Instance Attribute Summary collapse
-
#city ⇒ Object
Returns the value of attribute city.
-
#current_date_time ⇒ Object
Returns the value of attribute current_date_time.
-
#forecast_date_time ⇒ Object
Returns the value of attribute forecast_date_time.
-
#forecast_information ⇒ Object
Returns the value of attribute forecast_information.
-
#latitude ⇒ Object
Returns the value of attribute latitude.
-
#longitude ⇒ Object
Returns the value of attribute longitude.
-
#postal_code ⇒ Object
Returns the value of attribute postal_code.
-
#unit_system ⇒ Object
Returns the value of attribute unit_system.
Instance Method Summary collapse
- #forecast_date ⇒ Object
-
#initialize(wx) ⇒ Information
constructor
A new instance of Information.
Constructor Details
#initialize(wx) ⇒ Information
Returns a new instance of Information.
5 6 7 |
# File 'lib/gwx/forecast_information.rb', line 5 def initialize(wx) @forecast_information = wx["forecast_information"] end |
Instance Attribute Details
#city ⇒ Object
Returns the value of attribute city.
2 3 4 |
# File 'lib/gwx/forecast_information.rb', line 2 def city @city end |
#current_date_time ⇒ Object
Returns the value of attribute current_date_time.
2 3 4 |
# File 'lib/gwx/forecast_information.rb', line 2 def current_date_time @current_date_time end |
#forecast_date_time ⇒ Object
Returns the value of attribute forecast_date_time.
2 3 4 |
# File 'lib/gwx/forecast_information.rb', line 2 def forecast_date_time @forecast_date_time end |
#forecast_information ⇒ Object
Returns the value of attribute forecast_information.
2 3 4 |
# File 'lib/gwx/forecast_information.rb', line 2 def forecast_information @forecast_information end |
#latitude ⇒ Object
Returns the value of attribute latitude.
2 3 4 |
# File 'lib/gwx/forecast_information.rb', line 2 def latitude @latitude end |
#longitude ⇒ Object
Returns the value of attribute longitude.
2 3 4 |
# File 'lib/gwx/forecast_information.rb', line 2 def longitude @longitude end |
#postal_code ⇒ Object
Returns the value of attribute postal_code.
2 3 4 |
# File 'lib/gwx/forecast_information.rb', line 2 def postal_code @postal_code end |
#unit_system ⇒ Object
Returns the value of attribute unit_system.
2 3 4 |
# File 'lib/gwx/forecast_information.rb', line 2 def unit_system @unit_system end |
Instance Method Details
#forecast_date ⇒ Object
25 26 27 |
# File 'lib/gwx/forecast_information.rb', line 25 def forecast_date @forecast_date ||= @forecast_information["forecast_time"]["data"] end |