Class: RestPack::Core::Client::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/restpack-core-client/models/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data, channel = nil) ⇒ Configuration

Returns a new instance of Configuration.



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/restpack-core-client/models/configuration.rb', line 5

def initialize(data, channel = nil)          
  @id = data[:id]
  @key = data[:key]
  @value = data[:value]

  if channel
    @channel = channel
    @application = channel.get_application(data[:application_id])
    @domain = channel.get_domain(data[:domain_id])
  
    @channel.configurations << self
    @application.configurations << self if @application
    @domain.configurations << self if @domain
  end
end

Instance Attribute Details

#applicationObject

Returns the value of attribute application.



3
4
5
# File 'lib/restpack-core-client/models/configuration.rb', line 3

def application
  @application
end

#channelObject

Returns the value of attribute channel.



3
4
5
# File 'lib/restpack-core-client/models/configuration.rb', line 3

def channel
  @channel
end

#domainObject

Returns the value of attribute domain.



3
4
5
# File 'lib/restpack-core-client/models/configuration.rb', line 3

def domain
  @domain
end

#idObject

Returns the value of attribute id.



3
4
5
# File 'lib/restpack-core-client/models/configuration.rb', line 3

def id
  @id
end

#keyObject

Returns the value of attribute key.



3
4
5
# File 'lib/restpack-core-client/models/configuration.rb', line 3

def key
  @key
end

#valueObject

Returns the value of attribute value.



3
4
5
# File 'lib/restpack-core-client/models/configuration.rb', line 3

def value
  @value
end