Class: Helium::Configuration

Inherits:
Resource show all
Defined in:
lib/helium/configuration.rb

Instance Attribute Summary collapse

Attributes inherited from Resource

#id, #params, #type

Instance Method Summary collapse

Methods inherited from Resource

#==, all, all_path, #as_json, 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

#datetime_to_iso, #kebab_case

Constructor Details

#initialize(opts = {}) ⇒ Configuration

Returns a new instance of Configuration



5
6
7
8
# File 'lib/helium/configuration.rb', line 5

def initialize(opts = {})
  super(opts)
  @settings = @params.dig('attributes')
end

Instance Attribute Details

#settingsObject (readonly)

Returns the value of attribute settings



3
4
5
# File 'lib/helium/configuration.rb', line 3

def settings
  @settings
end

Instance Method Details

#device_configurationsObject



10
11
12
13
14
15
16
# File 'lib/helium/configuration.rb', line 10

def device_configurations
  Collection.new(
    klass: DeviceConfiguration,
    client: @client,
    belongs_to: self
  )
end