Class: Netatmo::Weather::StationData

Inherits:
Object
  • Object
show all
Defined in:
lib/netatmo/weather/station_data.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#devicesObject

Returns the value of attribute devices.



6
7
8
# File 'lib/netatmo/weather/station_data.rb', line 6

def devices
  @devices
end

#userObject

Returns the value of attribute user.



6
7
8
# File 'lib/netatmo/weather/station_data.rb', line 6

def user
  @user
end