Class: Redlink::Location
Instance Attribute Summary collapse
-
#country ⇒ Object
Returns the value of attribute country.
-
#current_weather ⇒ Object
Returns the value of attribute current_weather.
-
#location_id ⇒ Object
Returns the value of attribute location_id.
-
#name ⇒ Object
Returns the value of attribute name.
-
#thermostats ⇒ Object
Returns the value of attribute thermostats.
-
#time_zone ⇒ Object
Returns the value of attribute time_zone.
-
#type ⇒ Object
Returns the value of attribute type.
-
#zip_code ⇒ Object
Returns the value of attribute zip_code.
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Redthing
Constructor Details
This class inherits a constructor from Redlink::Redthing
Instance Attribute Details
#country ⇒ Object
Returns the value of attribute country.
3 4 5 |
# File 'lib/redlink/location.rb', line 3 def country @country end |
#current_weather ⇒ Object
Returns the value of attribute current_weather.
3 4 5 |
# File 'lib/redlink/location.rb', line 3 def current_weather @current_weather end |
#location_id ⇒ Object
Returns the value of attribute location_id.
3 4 5 |
# File 'lib/redlink/location.rb', line 3 def location_id @location_id end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/redlink/location.rb', line 3 def name @name end |
#thermostats ⇒ Object
Returns the value of attribute thermostats.
3 4 5 |
# File 'lib/redlink/location.rb', line 3 def thermostats @thermostats end |
#time_zone ⇒ Object
Returns the value of attribute time_zone.
3 4 5 |
# File 'lib/redlink/location.rb', line 3 def time_zone @time_zone end |
#type ⇒ Object
Returns the value of attribute type.
3 4 5 |
# File 'lib/redlink/location.rb', line 3 def type @type end |
#zip_code ⇒ Object
Returns the value of attribute zip_code.
3 4 5 |
# File 'lib/redlink/location.rb', line 3 def zip_code @zip_code end |
Class Method Details
.all ⇒ Object
23 24 25 26 27 |
# File 'lib/redlink/location.rb', line 23 def self.all @all ||= Endpoint.locations.map do |loc| Location.new(loc) end end |
.first ⇒ Object
29 30 31 |
# File 'lib/redlink/location.rb', line 29 def self.first all[0] end |
.last ⇒ Object
33 34 35 |
# File 'lib/redlink/location.rb', line 33 def self.last all[all.length - 1] end |
Instance Method Details
#to_s ⇒ Object
19 20 21 |
# File 'lib/redlink/location.rb', line 19 def to_s name end |