Class: Accuweather::Conditions::ForecastWeather
- Inherits:
-
Object
- Object
- Accuweather::Conditions::ForecastWeather
- Defined in:
- lib/accuweather/conditions/forecast_weather.rb
Instance Attribute Summary collapse
-
#high_temperature ⇒ Object
readonly
Returns the value of attribute high_temperature.
-
#ice_amount ⇒ Object
readonly
Returns the value of attribute ice_amount.
-
#ice_probability ⇒ Object
readonly
Returns the value of attribute ice_probability.
-
#low_temperature ⇒ Object
readonly
Returns the value of attribute low_temperature.
-
#max_uv ⇒ Object
readonly
Returns the value of attribute max_uv.
-
#precipitation_amount ⇒ Object
readonly
Returns the value of attribute precipitation_amount.
-
#precipitation_probability ⇒ Object
readonly
Returns the value of attribute precipitation_probability.
-
#rain_amount ⇒ Object
readonly
Returns the value of attribute rain_amount.
-
#rain_probability ⇒ Object
readonly
Returns the value of attribute rain_probability.
-
#real_feel_high ⇒ Object
readonly
Returns the value of attribute real_feel_high.
-
#real_feel_low ⇒ Object
readonly
Returns the value of attribute real_feel_low.
-
#snow_amount ⇒ Object
readonly
Returns the value of attribute snow_amount.
-
#snow_probability ⇒ Object
readonly
Returns the value of attribute snow_probability.
-
#thunderstorm_probability ⇒ Object
readonly
Returns the value of attribute thunderstorm_probability.
-
#weather_icon ⇒ Object
readonly
Returns the value of attribute weather_icon.
-
#weather_text ⇒ Object
readonly
Returns the value of attribute weather_text.
-
#weather_text_long ⇒ Object
readonly
Returns the value of attribute weather_text_long.
-
#wind_direction ⇒ Object
readonly
Returns the value of attribute wind_direction.
-
#wind_gust ⇒ Object
readonly
Returns the value of attribute wind_gust.
-
#wind_speed ⇒ Object
readonly
Returns the value of attribute wind_speed.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(weather_text:, weather_text_long:, weather_icon:, high_temperature:, low_temperature:, real_feel_high:, real_feel_low:, wind_speed:, wind_direction:, wind_gust:, max_uv:, rain_amount:, snow_amount:, ice_amount:, precipitation_amount:, thunderstorm_probability:, rain_probability:, snow_probability:, ice_probability:, precipitation_probability:) ⇒ ForecastWeather
constructor
A new instance of ForecastWeather.
- #to_s ⇒ Object
Constructor Details
#initialize(weather_text:, weather_text_long:, weather_icon:, high_temperature:, low_temperature:, real_feel_high:, real_feel_low:, wind_speed:, wind_direction:, wind_gust:, max_uv:, rain_amount:, snow_amount:, ice_amount:, precipitation_amount:, thunderstorm_probability:, rain_probability:, snow_probability:, ice_probability:, precipitation_probability:) ⇒ ForecastWeather
Returns a new instance of ForecastWeather.
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/accuweather/conditions/forecast_weather.rb', line 6 def initialize(weather_text:, weather_text_long:, weather_icon:, high_temperature:, low_temperature:, real_feel_high:, real_feel_low:, wind_speed:, wind_direction:, wind_gust:, max_uv:, rain_amount:, snow_amount:, ice_amount:, precipitation_amount:, thunderstorm_probability:, rain_probability:, snow_probability:, ice_probability:, precipitation_probability:) @weather_text = weather_text @weather_text_long = weather_text_long @weather_icon = weather_icon @high_temperature = high_temperature @low_temperature = low_temperature @real_feel_high = real_feel_high @real_feel_low = real_feel_low @wind_speed = wind_speed @wind_direction = wind_direction @wind_gust = wind_gust @max_uv = max_uv @rain_amount = rain_amount @snow_amount = snow_amount @ice_amount = ice_amount @precipitation_amount = precipitation_amount @thunderstorm_probability = thunderstorm_probability @rain_probability = rain_probability @snow_probability = snow_probability @ice_probability = ice_probability @precipitation_probability = precipitation_probability end |
Instance Attribute Details
#high_temperature ⇒ Object (readonly)
Returns the value of attribute high_temperature.
4 5 6 |
# File 'lib/accuweather/conditions/forecast_weather.rb', line 4 def high_temperature @high_temperature end |
#ice_amount ⇒ Object (readonly)
Returns the value of attribute ice_amount.
4 5 6 |
# File 'lib/accuweather/conditions/forecast_weather.rb', line 4 def ice_amount @ice_amount end |
#ice_probability ⇒ Object (readonly)
Returns the value of attribute ice_probability.
4 5 6 |
# File 'lib/accuweather/conditions/forecast_weather.rb', line 4 def ice_probability @ice_probability end |
#low_temperature ⇒ Object (readonly)
Returns the value of attribute low_temperature.
4 5 6 |
# File 'lib/accuweather/conditions/forecast_weather.rb', line 4 def low_temperature @low_temperature end |
#max_uv ⇒ Object (readonly)
Returns the value of attribute max_uv.
4 5 6 |
# File 'lib/accuweather/conditions/forecast_weather.rb', line 4 def max_uv @max_uv end |
#precipitation_amount ⇒ Object (readonly)
Returns the value of attribute precipitation_amount.
4 5 6 |
# File 'lib/accuweather/conditions/forecast_weather.rb', line 4 def precipitation_amount @precipitation_amount end |
#precipitation_probability ⇒ Object (readonly)
Returns the value of attribute precipitation_probability.
4 5 6 |
# File 'lib/accuweather/conditions/forecast_weather.rb', line 4 def precipitation_probability @precipitation_probability end |
#rain_amount ⇒ Object (readonly)
Returns the value of attribute rain_amount.
4 5 6 |
# File 'lib/accuweather/conditions/forecast_weather.rb', line 4 def rain_amount @rain_amount end |
#rain_probability ⇒ Object (readonly)
Returns the value of attribute rain_probability.
4 5 6 |
# File 'lib/accuweather/conditions/forecast_weather.rb', line 4 def rain_probability @rain_probability end |
#real_feel_high ⇒ Object (readonly)
Returns the value of attribute real_feel_high.
4 5 6 |
# File 'lib/accuweather/conditions/forecast_weather.rb', line 4 def real_feel_high @real_feel_high end |
#real_feel_low ⇒ Object (readonly)
Returns the value of attribute real_feel_low.
4 5 6 |
# File 'lib/accuweather/conditions/forecast_weather.rb', line 4 def real_feel_low @real_feel_low end |
#snow_amount ⇒ Object (readonly)
Returns the value of attribute snow_amount.
4 5 6 |
# File 'lib/accuweather/conditions/forecast_weather.rb', line 4 def snow_amount @snow_amount end |
#snow_probability ⇒ Object (readonly)
Returns the value of attribute snow_probability.
4 5 6 |
# File 'lib/accuweather/conditions/forecast_weather.rb', line 4 def snow_probability @snow_probability end |
#thunderstorm_probability ⇒ Object (readonly)
Returns the value of attribute thunderstorm_probability.
4 5 6 |
# File 'lib/accuweather/conditions/forecast_weather.rb', line 4 def thunderstorm_probability @thunderstorm_probability end |
#weather_icon ⇒ Object (readonly)
Returns the value of attribute weather_icon.
4 5 6 |
# File 'lib/accuweather/conditions/forecast_weather.rb', line 4 def weather_icon @weather_icon end |
#weather_text ⇒ Object (readonly)
Returns the value of attribute weather_text.
4 5 6 |
# File 'lib/accuweather/conditions/forecast_weather.rb', line 4 def weather_text @weather_text end |
#weather_text_long ⇒ Object (readonly)
Returns the value of attribute weather_text_long.
4 5 6 |
# File 'lib/accuweather/conditions/forecast_weather.rb', line 4 def weather_text_long @weather_text_long end |
#wind_direction ⇒ Object (readonly)
Returns the value of attribute wind_direction.
4 5 6 |
# File 'lib/accuweather/conditions/forecast_weather.rb', line 4 def wind_direction @wind_direction end |
#wind_gust ⇒ Object (readonly)
Returns the value of attribute wind_gust.
4 5 6 |
# File 'lib/accuweather/conditions/forecast_weather.rb', line 4 def wind_gust @wind_gust end |
#wind_speed ⇒ Object (readonly)
Returns the value of attribute wind_speed.
4 5 6 |
# File 'lib/accuweather/conditions/forecast_weather.rb', line 4 def wind_speed @wind_speed end |
Instance Method Details
#==(other) ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/accuweather/conditions/forecast_weather.rb', line 29 def ==(other) weather_text == other.weather_text && weather_text_long == other.weather_text_long && weather_icon == other.weather_icon && high_temperature == other.high_temperature && low_temperature == other.low_temperature && real_feel_high == other.real_feel_high && real_feel_low == other.real_feel_low && wind_speed == other.wind_speed && wind_direction == other.wind_direction && wind_gust == other.wind_gust && max_uv == other.max_uv && rain_amount == other.rain_amount && snow_amount == other.snow_amount && ice_amount == other.ice_amount && precipitation_amount == other.precipitation_amount && thunderstorm_probability == other.thunderstorm_probability && rain_probability == other.rain_probability && snow_probability == other.snow_probability && ice_probability == other.ice_probability && precipitation_probability == other.precipitation_probability rescue NoMethodError false end |
#to_s ⇒ Object
54 55 56 |
# File 'lib/accuweather/conditions/forecast_weather.rb', line 54 def to_s "weather_text: #{weather_text}, weather_text_long: #{weather_text_long}, weather_icon: #{weather_icon}, high_temperature: #{high_temperature}, low_temperature: #{low_temperature}, real_feel_high: #{real_feel_high}, real_feel_low: #{real_feel_low}, wind_speed: #{wind_speed}, wind_direction: #{wind_direction}, wind_gust: #{wind_gust}, max_uv: #{max_uv}, rain_amount: #{rain_amount}, snow_amount: #{snow_amount}, ice_amount: #{ice_amount}, precipitation_amount: #{precipitation_amount}, thunderstorm_probability: #{thunderstorm_probability}, rain_probability: #{rain_probability}, snow_probability: #{snow_probability}, ice_probability: #{ice_probability}, precipitation_probability: #{precipitation_probability}" end |