You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
moduleNest# Handles authorization and API logicclassNest;end# Stores structuresclassStructure;end# Device mixinmoduleDevice;endclassThermostat;includeDevice;endend
Using Device as a module seems more appropriate, since Device is technically an abstract class.
Calls could look something like this:
nest=Nest::Nest.new(email: 'email',password: 'password')nest.structures# => [Structure, Structure]nest.structures.first.thermostats# => [Thermostat, Thermostat, Thermostat, ...]# Not certain whether there should be a way to shallowly access the thermostats toonest.thermostats# => ALL thermostats
The text was updated successfully, but these errors were encountered:
The new hierarchy should be:
Using Device as a module seems more appropriate, since Device is technically an abstract class.
Calls could look something like this:
The text was updated successfully, but these errors were encountered: