Class: WeatherInfo::CurrentWeather

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

#humidityObject (readonly)

Returns the value of attribute humidity.



40
41
42
# File 'lib/weather_by_ip/weather.rb', line 40

def humidity
  @humidity
end

#iconObject (readonly)

Returns the value of attribute icon.



40
41
42
# File 'lib/weather_by_ip/weather.rb', line 40

def icon
  @icon
end

#skyObject (readonly)

Returns the value of attribute sky.



40
41
42
# File 'lib/weather_by_ip/weather.rb', line 40

def sky
  @sky
end

#temp_cObject (readonly)

Returns the value of attribute temp_c.



40
41
42
# File 'lib/weather_by_ip/weather.rb', line 40

def temp_c
  @temp_c
end

#temp_fObject (readonly)

Returns the value of attribute temp_f.



40
41
42
# File 'lib/weather_by_ip/weather.rb', line 40

def temp_f
  @temp_f
end

#windObject (readonly)

Returns the value of attribute wind.



40
41
42
# File 'lib/weather_by_ip/weather.rb', line 40

def wind
  @wind
end

Instance Method Details

#inspectObject



45
46
47
# File 'lib/weather_by_ip/weather.rb', line 45

def inspect
  "Today #{@temp_f}F (#{@temp_c}C), #{@sky}, #{@humidity}, #{@wind}"
end