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-6.3.1 lib/endpoint.rb
qwtf_discord_bot-6.3.0 lib/endpoint.rb
qwtf_discord_bot-6.2.2 lib/endpoint.rb
qwtf_discord_bot-6.2.1 lib/endpoint.rb
qwtf_discord_bot-6.2.0 lib/endpoint.rb
qwtf_discord_bot-6.1.5 lib/endpoint.rb
qwtf_discord_bot-6.1.4 lib/endpoint.rb
qwtf_discord_bot-6.1.3 lib/endpoint.rb
qwtf_discord_bot-6.1.2 lib/endpoint.rb
qwtf_discord_bot-6.1.1 lib/endpoint.rb
qwtf_discord_bot-6.1.0 lib/endpoint.rb
qwtf_discord_bot-6.0.4 lib/endpoint.rb
qwtf_discord_bot-6.0.3 lib/endpoint.rb
qwtf_discord_bot-6.0.2 lib/endpoint.rb
qwtf_discord_bot-6.0.1 lib/endpoint.rb
qwtf_discord_bot-5.5.26 lib/endpoint.rb
qwtf_discord_bot-5.5.25 lib/endpoint.rb
qwtf_discord_bot-5.5.24 lib/endpoint.rb
qwtf_discord_bot-5.5.23 lib/endpoint.rb
qwtf_discord_bot-5.5.22 lib/endpoint.rb