Sha256: 4b1ff7cca880485012d1b95997f2b039f70f8dd7ad3cb1e352b2a59174141979

Contents?: true

Size: 391 Bytes

Versions: 22

Compression:

Stored size: 391 Bytes

Contents

require 'endpoint'

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 emojis
    @emojis ||= @config["emojis"]
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
qwtf_discord_bot-5.1.11 lib/qwtf_discord_bot/config.rb
qwtf_discord_bot-5.1.9 lib/qwtf_discord_bot/config.rb
qwtf_discord_bot-5.1.8 lib/qwtf_discord_bot/config.rb
qwtf_discord_bot-5.1.6 lib/qwtf_discord_bot/config.rb
qwtf_discord_bot-5.1.5 lib/qwtf_discord_bot/config.rb
qwtf_discord_bot-5.1.4 lib/qwtf_discord_bot/config.rb
qwtf_discord_bot-5.1.3 lib/qwtf_discord_bot/config.rb
qwtf_discord_bot-5.1.2 lib/qwtf_discord_bot/config.rb
qwtf_discord_bot-5.1.1 lib/qwtf_discord_bot/config.rb
qwtf_discord_bot-5.1.0 lib/qwtf_discord_bot/config.rb
qwtf_discord_bot-5.0.4 lib/qwtf_discord_bot/config.rb
qwtf_discord_bot-5.0.3 lib/qwtf_discord_bot/config.rb
qwtf_discord_bot-5.0.2 lib/qwtf_discord_bot/config.rb
qwtf_discord_bot-5.0.1 lib/qwtf_discord_bot/config.rb
qwtf_discord_bot-4.2.6 lib/qwtf_discord_bot/config.rb
qwtf_discord_bot-4.2.5 lib/qwtf_discord_bot/config.rb
qwtf_discord_bot-4.2.4 lib/qwtf_discord_bot/config.rb
qwtf_discord_bot-4.2.3 lib/qwtf_discord_bot/config.rb
qwtf_discord_bot-4.2.2 lib/qwtf_discord_bot/config.rb
qwtf_discord_bot-4.2.1 lib/qwtf_discord_bot/config.rb