Class: LWS::Resource::Collection::WeatherLocation::Forecast

Inherits:
Item
  • Object
show all
Defined in:
lib/lws/apps/resource.rb

Overview

The collection weather location forecast class

Instance Attribute Summary collapse

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

#codeInteger



447
# File 'lib/lws/apps/resource.rb', line 447

attribute :code

#dateInteger



451
# File 'lib/lws/apps/resource.rb', line 451

attribute :date

#descriptionInteger



455
# File 'lib/lws/apps/resource.rb', line 455

attribute :description

#observationBoolean



460
# File 'lib/lws/apps/resource.rb', line 460

attribute :observation

#temperatureHash{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.



468
# File 'lib/lws/apps/resource.rb', line 468

attribute :temperature

#weather_locationCollection::WeatherLocation



473
474
475
# File 'lib/lws/apps/resource.rb', line 473

belongs_to :weather_location,
class_name: "LWS::Resource::Collection::WeatherLocation",
uri: "collections/:collection_id/weather_location(/:id)"

#weather_location_idInteger



480
# File 'lib/lws/apps/resource.rb', line 480

attribute :weather_location_id

#windHash{String=>Float}

The wind hash contains the wind chill temperature (key “chill”), direction in degrees (key “direction”), and wind speed (key “speed”).



487
# File 'lib/lws/apps/resource.rb', line 487

attribute :wind