Class: WeatherInfo::ForecastInfo
- Inherits:
-
ActiveApi::ApiObject
- Object
- ActiveApi::ApiObject
- WeatherInfo::ForecastInfo
- Includes:
- WeatherMethods
- Defined in:
- lib/weather_by_ip/weather.rb
Instance Attribute Summary collapse
-
#city ⇒ Object
readonly
Returns the value of attribute city.
-
#current_date ⇒ Object
readonly
Returns the value of attribute current_date.
-
#current_time ⇒ Object
readonly
Returns the value of attribute current_time.
-
#postal_code ⇒ Object
readonly
Returns the value of attribute postal_code.
Instance Method Summary collapse
Methods included from WeatherMethods
Instance Attribute Details
#city ⇒ Object (readonly)
Returns the value of attribute city.
22 23 24 |
# File 'lib/weather_by_ip/weather.rb', line 22 def city @city end |
#current_date ⇒ Object (readonly)
Returns the value of attribute current_date.
22 23 24 |
# File 'lib/weather_by_ip/weather.rb', line 22 def current_date @current_date end |
#current_time ⇒ Object (readonly)
Returns the value of attribute current_time.
22 23 24 |
# File 'lib/weather_by_ip/weather.rb', line 22 def current_time @current_time end |
#postal_code ⇒ Object (readonly)
Returns the value of attribute postal_code.
22 23 24 |
# File 'lib/weather_by_ip/weather.rb', line 22 def postal_code @postal_code end |
Instance Method Details
#==(other_info) ⇒ Object
31 32 33 34 |
# File 'lib/weather_by_ip/weather.rb', line 31 def ==(other_info) return false if other_info.nil? self.city == other_info.city end |
#inspect ⇒ Object
27 28 29 |
# File 'lib/weather_by_ip/weather.rb', line 27 def inspect "#{@city} #{@current_time}" end |