Sha256: 411b9f07b9754d952100844f2c31eb61146d3e9fefb3062ca133d4a6b9ca415f

Contents?: true

Size: 368 Bytes

Versions: 66

Compression:

Stored size: 368 Bytes

Contents

class Endpoint
  def initialize(config)
    @config = config
  end

  def address
    @config.keys.first
  end

  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
end

Version data entries

66 entries across 66 versions & 1 rubygems

Version Path
qwtf_discord_bot-5.5.21 lib/endpoint.rb
qwtf_discord_bot-5.5.20 lib/endpoint.rb
qwtf_discord_bot-5.5.19 lib/endpoint.rb
qwtf_discord_bot-5.5.18 lib/endpoint.rb
qwtf_discord_bot-5.5.17 lib/endpoint.rb
qwtf_discord_bot-5.5.16 lib/endpoint.rb
qwtf_discord_bot-5.5.15 lib/endpoint.rb
qwtf_discord_bot-5.5.14 lib/endpoint.rb
qwtf_discord_bot-5.5.13 lib/endpoint.rb
qwtf_discord_bot-5.5.12 lib/endpoint.rb
qwtf_discord_bot-5.5.11 lib/endpoint.rb
qwtf_discord_bot-5.5.10 lib/endpoint.rb
qwtf_discord_bot-5.5.9 lib/endpoint.rb
qwtf_discord_bot-5.5.8 lib/endpoint.rb
qwtf_discord_bot-5.5.7 lib/endpoint.rb
qwtf_discord_bot-5.5.6 lib/endpoint.rb
qwtf_discord_bot-5.5.5 lib/endpoint.rb
qwtf_discord_bot-5.5.4 lib/endpoint.rb
qwtf_discord_bot-5.5.3 lib/endpoint.rb
qwtf_discord_bot-5.5.2 lib/endpoint.rb