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.



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

def humidity
  @humidity
end

#iconObject (readonly)

Returns the value of attribute icon.



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

def icon
  @icon
end

#skyObject (readonly)

Returns the value of attribute sky.



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

def sky
  @sky
end

#temp_cObject (readonly)

Returns the value of attribute temp_c.



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

def temp_c
  @temp_c
end

#temp_fObject (readonly)

Returns the value of attribute temp_f.



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

def temp_f
  @temp_f
end

#windObject (readonly)

Returns the value of attribute wind.



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

def wind
  @wind
end

Instance Method Details

#inspectObject



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

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