Class: RestPack::Core::Client::Domain

Inherits:
Object
  • Object
show all
Defined in:
lib/restpack_core_client/models/domain.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data, channel) ⇒ Domain

Returns a new instance of Domain.



5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/restpack_core_client/models/domain.rb', line 5

def initialize(data, channel)
  @configurations = []

  @id = data[:id].to_i
  @host = data[:host]
  @href = data[:href]

  @channel = channel
  @application = channel.get_application(data[:links][:application])

  @channel.domains << self
  @application.domains << self
end

Instance Attribute Details

#applicationObject

Returns the value of attribute application.



3
4
5
# File 'lib/restpack_core_client/models/domain.rb', line 3

def application
  @application
end

#channelObject

Returns the value of attribute channel.



3
4
5
# File 'lib/restpack_core_client/models/domain.rb', line 3

def channel
  @channel
end

#configurationsObject

Returns the value of attribute configurations.



3
4
5
# File 'lib/restpack_core_client/models/domain.rb', line 3

def configurations
  @configurations
end

#hostObject

Returns the value of attribute host.



3
4
5
# File 'lib/restpack_core_client/models/domain.rb', line 3

def host
  @host
end

#hrefObject

Returns the value of attribute href.



3
4
5
# File 'lib/restpack_core_client/models/domain.rb', line 3

def href
  @href
end

#idObject

Returns the value of attribute id.



3
4
5
# File 'lib/restpack_core_client/models/domain.rb', line 3

def id
  @id
end