Module: App::Config
- Defined in:
- lib/app/config.rb,
lib/app/config/base.rb,
lib/app/config/json.rb,
lib/app/config/ruby.rb,
lib/app/config/yaml.rb,
lib/app/config/version.rb
Defined Under Namespace
Modules: Base Classes: Error, JSON, RUBY, YAML
Constant Summary collapse
- DEFAULT_PATH =
"$ROOT/config/defaults:$ROOT/config:$ROOT/var"- VERSION =
"0.1.5"
Class Method Summary collapse
Class Method Details
.new(*args, **opts) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/app/config.rb', line 11 def new( *args, **opts ) type = args.shift || :YAML case type.to_sym when :RUBY App::Config::RUBY.new( **opts ) when :YAML App::Config::YAML.new( **opts ) when :JSON App::Config::JSON.new( **opts ) else raise App::Config::Error, "unknown type: #{type}" end end |