Sha256: 2ab9fbadd4ea7c16f8ee1a7a6cdfe8c53692878c14aad0416f7ebe0db5a65798
Contents?: true
Size: 437 Bytes
Versions: 6
Compression:
Stored size: 437 Bytes
Contents
require 'hashie' module Kuroko2 class Configuration class << self DEFAULT_CONFIG = { table_name_prefix: 'kuroko2_' }.freeze def config @config ||= build_config end def build_config filename = Rails.root.join('config', 'kuroko2.yml') yaml = YAML::load(ERB.new(File.read(filename)).result) Hashie::Mash.new(DEFAULT_CONFIG.merge(yaml[Rails.env])) end end end end
Version data entries
6 entries across 6 versions & 1 rubygems