class Redlink::Location
Attributes
country[RW]
current_weather[RW]
location_id[RW]
name[RW]
thermostats[RW]
time_zone[RW]
type[RW]
zip_code[RW]
Public Class Methods
all()
click to toggle source
# File lib/redlink/location.rb, line 23 def self.all @all ||= Endpoint.locations.map do |loc| Location.new(loc) end end
first()
click to toggle source
# File lib/redlink/location.rb, line 29 def self.first all[0] end
last()
click to toggle source
# File lib/redlink/location.rb, line 33 def self.last all[all.length - 1] end
Public Instance Methods
current_weather=(val)
click to toggle source
# File lib/redlink/location.rb, line 15 def current_weather=(val) @current_weather = Weather.new(val) end
thermostats=(val)
click to toggle source
# File lib/redlink/location.rb, line 5 def thermostats=(val) @thermostats = val[:thermostat_info].map do |therm| Thermostat.new(therm) end end
to_s()
click to toggle source
# File lib/redlink/location.rb, line 19 def to_s name end