Class: Tenkit::CurrentWeather
- Inherits:
-
Object
- Object
- Tenkit::CurrentWeather
- Defined in:
- lib/tenkit/current_weather.rb
Instance Attribute Summary collapse
-
#as_of ⇒ Object
readonly
Returns the value of attribute as_of.
-
#cloud_cover ⇒ Object
readonly
Returns the value of attribute cloud_cover.
-
#condition_code ⇒ Object
readonly
Returns the value of attribute condition_code.
-
#daylight ⇒ Object
readonly
Returns the value of attribute daylight.
-
#humidity ⇒ Object
readonly
Returns the value of attribute humidity.
-
#metadata ⇒ Object
readonly
Returns the value of attribute metadata.
-
#precipitation_intensity ⇒ Object
readonly
Returns the value of attribute precipitation_intensity.
-
#pressure ⇒ Object
readonly
Returns the value of attribute pressure.
-
#pressure_trend ⇒ Object
readonly
Returns the value of attribute pressure_trend.
-
#temperature ⇒ Object
readonly
Returns the value of attribute temperature.
-
#temperature_apparent ⇒ Object
readonly
Returns the value of attribute temperature_apparent.
-
#temperature_dew_point ⇒ Object
readonly
Returns the value of attribute temperature_dew_point.
-
#uv_index ⇒ Object
readonly
Returns the value of attribute uv_index.
-
#visibility ⇒ Object
readonly
Returns the value of attribute visibility.
-
#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
-
#initialize(current_weather) ⇒ CurrentWeather
constructor
A new instance of CurrentWeather.
Constructor Details
#initialize(current_weather) ⇒ CurrentWeather
Returns a new instance of CurrentWeather.
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/tenkit/current_weather.rb', line 23 def initialize(current_weather) return if current_weather.nil? @as_of = current_weather['asOf'] @cloud_cover = current_weather['cloudCover'] @condition_code = current_weather['conditionCode'] @daylight = current_weather['daylight'] @humidity = current_weather['humidity'] = Metadata.new(current_weather['metadata']) @precipitation_intensity = current_weather['precipitationIntensity'] @pressure = current_weather['pressure'] @pressure_trend = current_weather['pressureTrend'] @temperature = current_weather['temperature'] @temperature_apparent = current_weather['temperatureApparent'] @temperature_dew_point = current_weather['temperatureDewPoint'] @uv_index = current_weather['uvIndex'] @visibility = current_weather['visibility'] @wind_direction = current_weather['windDirection'] @wind_gust = current_weather['windGust'] @wind_speed = current_weather['windSpeed'] end |
Instance Attribute Details
#as_of ⇒ Object (readonly)
Returns the value of attribute as_of.
5 6 7 |
# File 'lib/tenkit/current_weather.rb', line 5 def as_of @as_of end |
#cloud_cover ⇒ Object (readonly)
Returns the value of attribute cloud_cover.
5 6 7 |
# File 'lib/tenkit/current_weather.rb', line 5 def cloud_cover @cloud_cover end |
#condition_code ⇒ Object (readonly)
Returns the value of attribute condition_code.
5 6 7 |
# File 'lib/tenkit/current_weather.rb', line 5 def condition_code @condition_code end |
#daylight ⇒ Object (readonly)
Returns the value of attribute daylight.
5 6 7 |
# File 'lib/tenkit/current_weather.rb', line 5 def daylight @daylight end |
#humidity ⇒ Object (readonly)
Returns the value of attribute humidity.
5 6 7 |
# File 'lib/tenkit/current_weather.rb', line 5 def humidity @humidity end |
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata.
5 6 7 |
# File 'lib/tenkit/current_weather.rb', line 5 def end |
#precipitation_intensity ⇒ Object (readonly)
Returns the value of attribute precipitation_intensity.
5 6 7 |
# File 'lib/tenkit/current_weather.rb', line 5 def precipitation_intensity @precipitation_intensity end |
#pressure ⇒ Object (readonly)
Returns the value of attribute pressure.
5 6 7 |
# File 'lib/tenkit/current_weather.rb', line 5 def pressure @pressure end |
#pressure_trend ⇒ Object (readonly)
Returns the value of attribute pressure_trend.
5 6 7 |
# File 'lib/tenkit/current_weather.rb', line 5 def pressure_trend @pressure_trend end |
#temperature ⇒ Object (readonly)
Returns the value of attribute temperature.
5 6 7 |
# File 'lib/tenkit/current_weather.rb', line 5 def temperature @temperature end |
#temperature_apparent ⇒ Object (readonly)
Returns the value of attribute temperature_apparent.
5 6 7 |
# File 'lib/tenkit/current_weather.rb', line 5 def temperature_apparent @temperature_apparent end |
#temperature_dew_point ⇒ Object (readonly)
Returns the value of attribute temperature_dew_point.
5 6 7 |
# File 'lib/tenkit/current_weather.rb', line 5 def temperature_dew_point @temperature_dew_point end |
#uv_index ⇒ Object (readonly)
Returns the value of attribute uv_index.
5 6 7 |
# File 'lib/tenkit/current_weather.rb', line 5 def uv_index @uv_index end |
#visibility ⇒ Object (readonly)
Returns the value of attribute visibility.
5 6 7 |
# File 'lib/tenkit/current_weather.rb', line 5 def visibility @visibility end |
#wind_direction ⇒ Object (readonly)
Returns the value of attribute wind_direction.
5 6 7 |
# File 'lib/tenkit/current_weather.rb', line 5 def wind_direction @wind_direction end |
#wind_gust ⇒ Object (readonly)
Returns the value of attribute wind_gust.
5 6 7 |
# File 'lib/tenkit/current_weather.rb', line 5 def wind_gust @wind_gust end |
#wind_speed ⇒ Object (readonly)
Returns the value of attribute wind_speed.
5 6 7 |
# File 'lib/tenkit/current_weather.rb', line 5 def wind_speed @wind_speed end |