Class: Helium::DeviceConfiguration
- Defined in:
- lib/helium/device_configuration.rb
Instance Attribute Summary collapse
-
#loaded ⇒ Object
readonly
Returns the value of attribute loaded.
Attributes inherited from Resource
Instance Method Summary collapse
- #as_json ⇒ Object
- #configuration ⇒ Object
- #device ⇒ Object
-
#initialize(opts = {}) ⇒ DeviceConfiguration
constructor
A new instance of DeviceConfiguration.
Methods inherited from Resource
#==, all, all_path, create, #created_at, #destroy, #eql?, find, #hash, initialize_from_path, #metadata, resource_name, #resource_name, #resource_path, singleton, #to_json, #update, #updated_at
Methods included from Utils
Constructor Details
#initialize(opts = {}) ⇒ DeviceConfiguration
Returns a new instance of DeviceConfiguration
5 6 7 8 |
# File 'lib/helium/device_configuration.rb', line 5 def initialize(opts = {}) super(opts) @loaded = @params.dig('meta', 'loaded') end |
Instance Attribute Details
#loaded ⇒ Object (readonly)
Returns the value of attribute loaded
3 4 5 |
# File 'lib/helium/device_configuration.rb', line 3 def loaded @loaded end |
Instance Method Details
#as_json ⇒ Object
18 19 20 |
# File 'lib/helium/device_configuration.rb', line 18 def as_json super.merge({ loaded: loaded }) end |
#configuration ⇒ Object
14 15 16 |
# File 'lib/helium/device_configuration.rb', line 14 def configuration @client.device_configuration_configuration(self) end |
#device ⇒ Object
10 11 12 |
# File 'lib/helium/device_configuration.rb', line 10 def device @client.device_configuration_device(self) end |