module Mutaconf
Constants
- VERSION
Public Class Methods
config(*args, &block)
click to toggle source
# File lib/mutaconf.rb, line 17 def self.config *args, &block Config.find *args, &block end
config_file(*args, &block)
click to toggle source
# File lib/mutaconf.rb, line 21 def self.config_file *args, &block Config.find_file *args, &block end
env(*args)
click to toggle source
# File lib/mutaconf.rb, line 6 def self.env *args options = args.last.kind_of?(Hash) ? args.pop : {} args.flatten.inject({}) do |memo,key| env_key = options[:upcase] == false ? key.to_s : key.to_s.upcase prefix = options[:prefix] prefix = prefix.upcase if prefix and options[:upcase] != false memo[key.to_sym] = ENV["#{prefix}#{env_key}"] memo end end