Class: GoogleWeather::Information

Inherits:
Object
  • Object
show all
Defined in:
lib/gwx/forecast_information.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#cityObject

Returns the value of attribute city.



2
3
4
# File 'lib/gwx/forecast_information.rb', line 2

def city
  @city
end

#current_date_timeObject

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_timeObject

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_informationObject

Returns the value of attribute forecast_information.



2
3
4
# File 'lib/gwx/forecast_information.rb', line 2

def forecast_information
  @forecast_information
end

#latitudeObject

Returns the value of attribute latitude.



2
3
4
# File 'lib/gwx/forecast_information.rb', line 2

def latitude
  @latitude
end

#longitudeObject

Returns the value of attribute longitude.



2
3
4
# File 'lib/gwx/forecast_information.rb', line 2

def longitude
  @longitude
end

#postal_codeObject

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_systemObject

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_dateObject



25
26
27
# File 'lib/gwx/forecast_information.rb', line 25

def forecast_date
  @forecast_date ||= @forecast_information["forecast_time"]["data"]
end