Sha256: 71899280ca9753e4559f8dfe7411fdd00abaa5106ad33512789c03c210dedc00

Contents?: true

Size: 477 Bytes

Versions: 42

Compression:

Stored size: 477 Bytes

Contents

require 'endpoint'
require 'dashboard'

class Config
  def initialize(config)
    @config = YAML.load_file(config)
  end

  def token
    @token ||= @config['token']
  end

  def client_id
    @client_id ||= @config['client_id']
  end

  def endpoints
    @endpoints ||= @config['endpoints'].map do |endpoint|
      Endpoint.new(endpoint)
    end
  end

  def dashboards
    @dashboards ||= @config['dashboards']
  end

  def emojis
    @emojis ||= @config['emojis']
  end
end

Version data entries

42 entries across 42 versions & 1 rubygems

Version Path
qwtf_discord_bot-6.3.1 lib/qwtf_discord_bot/config.rb
qwtf_discord_bot-6.3.0 lib/qwtf_discord_bot/config.rb
qwtf_discord_bot-6.2.2 lib/qwtf_discord_bot/config.rb
qwtf_discord_bot-6.2.1 lib/qwtf_discord_bot/config.rb
qwtf_discord_bot-6.2.0 lib/qwtf_discord_bot/config.rb
qwtf_discord_bot-6.1.5 lib/qwtf_discord_bot/config.rb
qwtf_discord_bot-6.1.4 lib/qwtf_discord_bot/config.rb
qwtf_discord_bot-6.1.3 lib/qwtf_discord_bot/config.rb
qwtf_discord_bot-6.1.2 lib/qwtf_discord_bot/config.rb
qwtf_discord_bot-6.1.1 lib/qwtf_discord_bot/config.rb
qwtf_discord_bot-6.1.0 lib/qwtf_discord_bot/config.rb
qwtf_discord_bot-6.0.4 lib/qwtf_discord_bot/config.rb
qwtf_discord_bot-6.0.3 lib/qwtf_discord_bot/config.rb
qwtf_discord_bot-6.0.2 lib/qwtf_discord_bot/config.rb
qwtf_discord_bot-6.0.1 lib/qwtf_discord_bot/config.rb
qwtf_discord_bot-5.5.26 lib/qwtf_discord_bot/config.rb
qwtf_discord_bot-5.5.25 lib/qwtf_discord_bot/config.rb
qwtf_discord_bot-5.5.24 lib/qwtf_discord_bot/config.rb
qwtf_discord_bot-5.5.23 lib/qwtf_discord_bot/config.rb
qwtf_discord_bot-5.5.22 lib/qwtf_discord_bot/config.rb