Class: Netatmo::Weather::StationData
- Inherits:
-
Object
- Object
- Netatmo::Weather::StationData
- Defined in:
- lib/netatmo/weather/station_data.rb
Instance Attribute Summary collapse
-
#devices ⇒ Object
Returns the value of attribute devices.
-
#user ⇒ Object
Returns the value of attribute user.
Instance Method Summary collapse
-
#initialize(response) ⇒ StationData
constructor
A new instance of StationData.
Constructor Details
#initialize(response) ⇒ StationData
Returns a new instance of StationData.
8 9 10 11 12 13 14 15 16 |
# File 'lib/netatmo/weather/station_data.rb', line 8 def initialize(response) self.devices = [] response['devices'].each do |device| devices << Device.parse(device) end self.user = Netatmo::User.new(response['user']) end |
Instance Attribute Details
#devices ⇒ Object
Returns the value of attribute devices.
6 7 8 |
# File 'lib/netatmo/weather/station_data.rb', line 6 def devices @devices end |
#user ⇒ Object
Returns the value of attribute user.
6 7 8 |
# File 'lib/netatmo/weather/station_data.rb', line 6 def user @user end |