Class: WeatherInfo::ForecastInfo

Inherits:
ActiveApi::ApiObject
  • Object
show all
Includes:
WeatherMethods
Defined in:
lib/weather_by_ip/weather.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from WeatherMethods

#get_icon_path, #to_s

Instance Attribute Details

#cityObject (readonly)

Returns the value of attribute city.



21
22
23
# File 'lib/weather_by_ip/weather.rb', line 21

def city
  @city
end

#current_dateObject (readonly)

Returns the value of attribute current_date.



21
22
23
# File 'lib/weather_by_ip/weather.rb', line 21

def current_date
  @current_date
end

#current_timeObject (readonly)

Returns the value of attribute current_time.



21
22
23
# File 'lib/weather_by_ip/weather.rb', line 21

def current_time
  @current_time
end

#postal_codeObject (readonly)

Returns the value of attribute postal_code.



21
22
23
# File 'lib/weather_by_ip/weather.rb', line 21

def postal_code
  @postal_code
end

Instance Method Details

#==(other_info) ⇒ Object



30
31
32
33
# File 'lib/weather_by_ip/weather.rb', line 30

def ==(other_info)
  return false if other_info.nil?
  self.city == other_info.city
end

#inspectObject



26
27
28
# File 'lib/weather_by_ip/weather.rb', line 26

def inspect
  "#{@city} #{@current_time}"
end