Class: Endpoint
- Inherits:
-
Object
- Object
- Endpoint
- Defined in:
- lib/endpoint.rb
Instance Method Summary collapse
- #address ⇒ Object
- #channel_ids ⇒ Object
-
#initialize(config) ⇒ Endpoint
constructor
A new instance of Endpoint.
Constructor Details
#initialize(config) ⇒ Endpoint
Returns a new instance of Endpoint.
2 3 4 |
# File 'lib/endpoint.rb', line 2 def initialize(config) @config = config end |
Instance Method Details
#address ⇒ Object
6 7 8 |
# File 'lib/endpoint.rb', line 6 def address @config.keys.first end |
#channel_ids ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/endpoint.rb', line 10 def channel_ids channel_ids = [] @config.values.each do |settings| settings.each do |setting| setting['channel_ids'].each do |channel_id| channel_ids << channel_id end end end channel_ids end |