Class: RestPack::Core::Client::Channel
- Inherits:
-
Object
- Object
- RestPack::Core::Client::Channel
- Defined in:
- lib/restpack-core-client/models/channel.rb
Instance Attribute Summary collapse
-
#applications ⇒ Object
Returns the value of attribute applications.
-
#configurations ⇒ Object
Returns the value of attribute configurations.
-
#domains ⇒ Object
Returns the value of attribute domains.
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
- #get_application(id) ⇒ Object
- #get_configuration(id) ⇒ Object
- #get_domain(id) ⇒ Object
- #get_domain_by_host(host) ⇒ Object
-
#initialize(data) ⇒ Channel
constructor
A new instance of Channel.
Constructor Details
#initialize(data) ⇒ Channel
Returns a new instance of Channel.
5 6 7 8 9 10 11 12 |
# File 'lib/restpack-core-client/models/channel.rb', line 5 def initialize(data) @applications = [] @domains = [] @configurations = [] @id = data[:channel][:id] @name = data[:channel][:name] end |
Instance Attribute Details
#applications ⇒ Object
Returns the value of attribute applications.
3 4 5 |
# File 'lib/restpack-core-client/models/channel.rb', line 3 def applications @applications end |
#configurations ⇒ Object
Returns the value of attribute configurations.
3 4 5 |
# File 'lib/restpack-core-client/models/channel.rb', line 3 def configurations @configurations end |
#domains ⇒ Object
Returns the value of attribute domains.
3 4 5 |
# File 'lib/restpack-core-client/models/channel.rb', line 3 def domains @domains end |
#id ⇒ Object
Returns the value of attribute id.
3 4 5 |
# File 'lib/restpack-core-client/models/channel.rb', line 3 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/restpack-core-client/models/channel.rb', line 3 def name @name end |
Instance Method Details
#get_application(id) ⇒ Object
14 15 16 |
# File 'lib/restpack-core-client/models/channel.rb', line 14 def get_application(id) @applications.find { |a| a.id == id } end |
#get_configuration(id) ⇒ Object
26 27 28 |
# File 'lib/restpack-core-client/models/channel.rb', line 26 def get_configuration(id) @configurations.find { |a| a.id == id } end |
#get_domain(id) ⇒ Object
18 19 20 |
# File 'lib/restpack-core-client/models/channel.rb', line 18 def get_domain(id) @domains.find { |a| a.id == id } end |
#get_domain_by_host(host) ⇒ Object
22 23 24 |
# File 'lib/restpack-core-client/models/channel.rb', line 22 def get_domain_by_host(host) @domains.find { |a| a.host == host } end |