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

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

Overview

The collection weather location class

Defined Under Namespace

Classes: Forecast

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

#dig, #reload, #rollback, #save

Instance Attribute Details

#cityString

Returns the city of the weather location.

Returns:

  • (String)

    the city of the weather location



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

attribute :city

#countryString

Returns the country of the weather location.

Returns:

  • (String)

    the country of the weather location



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

attribute :country

#descriptionString

Returns the description of the weather location.

Returns:

  • (String)

    the description of the weather location



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

attribute :description

#feed_urlString

Returns the URL of the feed of the weather location.

Returns:

  • (String)

    the URL of the feed of the weather location



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

attribute :feed_url

#forecastsForecast

Returns the forecasts for the weather location.

Returns:

  • (Forecast)

    the forecasts for the weather location



402
403
404
# File 'lib/lws/apps/resource.rb', line 402

has_many :forecasts,
class_name: "LWS::Resource::Collection::WeatherLocation::Forecast",
uri: "collections/:collection_id/weather_location/:weather_location_id/forecasts(/:id)"

#kind"unknown", "yahoo"

Returns the kind of the weather location.

Returns:

  • ("unknown", "yahoo")

    the kind of the weather location



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

attribute :kind

#latFloat?

Returns the latitude of the weather location.

Returns:

  • (Float, nil)

    the latitude of the weather location



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

attribute :lat

Returns the link of the weather location.

Returns:

  • (String)

    the link of the weather location



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

attribute :link

#longFloat?

Returns the longitude of the weather location.

Returns:

  • (Float, nil)

    the longitude of the weather location



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

attribute :long

#refresh_intervalInteger

Returns the interval used to refresh the weather location (in seconds).

Returns:

  • (Integer)

    the interval used to refresh the weather location (in seconds)



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

attribute :refresh_interval

#regionString

Returns the region of the weather location.

Returns:

  • (String)

    the region of the weather location



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

attribute :region

#titleString

Returns the title of the weather location.

Returns:

  • (String)

    the title of the weather location



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

attribute :title