Module: Confuse::Source
- Defined in:
- lib/confuse/source.rb,
lib/confuse/source/env.rb,
lib/confuse/source/ini.rb,
lib/confuse/source/yaml.rb
Defined Under Namespace
Class Method Summary collapse
Class Method Details
.create(options = {}) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/confuse/source.rb', line 10 def create( = {}) path = [:path] type = if path path[path.rindex('.') + 1, path.length].to_sym end type ||= [:type] if type types[type].new() else Env.new() end end |
.register(type, klass) ⇒ Object
25 26 27 |
# File 'lib/confuse/source.rb', line 25 def register(type, klass) types[type] = klass end |
.types ⇒ Object
6 7 8 |
# File 'lib/confuse/source.rb', line 6 def types @types ||= { } end |