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.
-
#href ⇒ Object
Returns the value of attribute href.
-
#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 13 |
# File 'lib/restpack_core_client/models/channel.rb', line 5 def initialize(data) @applications = [] @domains = [] @configurations = [] @id = data[:id].to_i @name = data[:name] @href = data[:href] 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 |
#href ⇒ Object
Returns the value of attribute href.
3 4 5 |
# File 'lib/restpack_core_client/models/channel.rb', line 3 def href @href 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
15 16 17 |
# File 'lib/restpack_core_client/models/channel.rb', line 15 def get_application(id) @applications.find { |a| a.id == id.to_i } end |
#get_configuration(id) ⇒ Object
27 28 29 |
# File 'lib/restpack_core_client/models/channel.rb', line 27 def get_configuration(id) @configurations.find { |a| a.id == id.to_i } end |
#get_domain(id) ⇒ Object
19 20 21 |
# File 'lib/restpack_core_client/models/channel.rb', line 19 def get_domain(id) @domains.find { |a| a.id == id.to_i } end |
#get_domain_by_host(host) ⇒ Object
23 24 25 |
# File 'lib/restpack_core_client/models/channel.rb', line 23 def get_domain_by_host(host) @domains.find { |a| a.host == host } end |