module Elasticord::Config

Public Instance Methods

data() click to toggle source
# File lib/elasticord/config.rb, line 19
def data
  @data ||= {}
end
get(key) click to toggle source
# File lib/elasticord/config.rb, line 9
def get(key)
  return data[key] if data.key?(key)

  ENV.fetch(key.to_s.upcase, ENV.fetch("ELASTICORD_#{key.to_s.upcase}"))
end
prefix(value) click to toggle source
# File lib/elasticord/config.rb, line 15
def prefix(value)
  @prefix = value
end
set(key, value) click to toggle source
# File lib/elasticord/config.rb, line 5
def set(key, value)
  data[key] = value
end