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.



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

def city
  @city
end

#current_dateObject (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_timeObject (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_codeObject (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

#inspectObject



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

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