lib/qonfig/loaders.rb in qonfig-0.16.0 vs lib/qonfig/loaders.rb in qonfig-0.17.0
- old
+ new
@@ -4,10 +4,11 @@
# @since 0.2.0
module Qonfig::Loaders
require_relative 'loaders/basic'
require_relative 'loaders/json'
require_relative 'loaders/yaml'
+ require_relative 'loaders/dynamic'
require_relative 'loaders/end_data'
class << self
# @param format [String, Symbol]
# @return [Module]
@@ -20,9 +21,11 @@
case format.to_s
when 'yaml', 'yml'
Qonfig::Loaders::YAML
when 'json'
Qonfig::Loaders::JSON
+ when 'dynamic'
+ Qonfig::Loaders::Dynamic
else
raise(Qonfig::UnsupportedLoaderFormatError, "<#{format}> format is not supported.")
end
end
alias_method :[], :resolve