Class: LWS::Resource::Collection::WeatherLocation::Forecast
- Inherits:
-
Item
- Object
- Spyke::Base
- Generic::Model
- Item
- LWS::Resource::Collection::WeatherLocation::Forecast
- Defined in:
- lib/lws/apps/resource.rb
Overview
The collection weather location forecast class
Instance Attribute Summary collapse
-
#code ⇒ Integer
The code for the weather location forecast.
-
#date ⇒ Integer
The timestamp of the date of the weather location forecast.
-
#description ⇒ Integer
The description of the weather location forecast.
-
#observation ⇒ Boolean
Whether the weather location forecast is a current observation.
-
#temperature ⇒ Hash{String=>Float}
The temperature hash contains either the current temperature (key “now”) if the forecast is an observation or the temperature range (keys “low” and “high”) if it is not.
-
#weather_location ⇒ Collection::WeatherLocation
The collection weather location that the collection weather location post is a part of.
-
#weather_location_id ⇒ Integer
The ID of the collection weather location that the collection weather location is a post is part of.
-
#wind ⇒ Hash{String=>Float}
The wind hash contains the wind chill temperature (key “chill”), direction in degrees (key “direction”), and wind speed (key “speed”).
Attributes inherited from Item
#collection, #collection_id, #metadata, #name, #position
Attributes inherited from Generic::Model
#created_at, #id, #updated_at, #url, #url_html
Method Summary
Methods inherited from Generic::Model
#deep_dup, #dig, #reload, #rollback, #save
Instance Attribute Details
#code ⇒ Integer
Returns the code for the weather location forecast.
392 |
# File 'lib/lws/apps/resource.rb', line 392 attribute :code |
#date ⇒ Integer
Returns the timestamp of the date of the weather location forecast.
396 |
# File 'lib/lws/apps/resource.rb', line 396 attribute :date |
#description ⇒ Integer
Returns the description of the weather location forecast.
400 |
# File 'lib/lws/apps/resource.rb', line 400 attribute :description |
#observation ⇒ Boolean
Returns whether the weather location forecast is a current observation.
405 |
# File 'lib/lws/apps/resource.rb', line 405 attribute :observation |
#temperature ⇒ Hash{String=>Float}
The temperature hash contains either the current temperature (key “now”) if the forecast is an observation or the temperature range (keys “low” and “high”) if it is not.
413 |
# File 'lib/lws/apps/resource.rb', line 413 attribute :temperature |
#weather_location ⇒ Collection::WeatherLocation
Returns the collection weather location that the collection weather location post is a part of.
418 419 420 |
# File 'lib/lws/apps/resource.rb', line 418 belongs_to :weather_location, class_name: "LWS::Resource::Collection::WeatherLocation", uri: "collections/:collection_id/weather_location(/:id)" |
#weather_location_id ⇒ Integer
Returns the ID of the collection weather location that the collection weather location is a post is part of.
425 |
# File 'lib/lws/apps/resource.rb', line 425 attribute :weather_location_id |
#wind ⇒ Hash{String=>Float}
The wind hash contains the wind chill temperature (key “chill”), direction in degrees (key “direction”), and wind speed (key “speed”).
432 |
# File 'lib/lws/apps/resource.rb', line 432 attribute :wind |