Module: Confu
- Defined in:
- lib/confu.rb,
lib/confu/version.rb,
lib/confu/confu_railtie.rb,
lib/generators/confu/install_generator.rb
Defined Under Namespace
Modules: Generators, Rails Classes: Config
Constant Summary collapse
- VERSION =
"0.0.1"
Class Method Summary collapse
Class Method Details
.load_config_files(path) ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/confu.rb', line 14 def self.load_config_files(path) Dir[File.join(path, '*yml')].each do |file| name = File.basename(file, '.yml').camelize + 'Config' yml = YAML.load_file(file)[::Rails.env] Object.const_set(name, Config.new(yml)) end end |