| Class | Core::Config::Factory |
| In: |
core/config.rb
|
| Parent: | Object |
Configuration Parser Factory class, used to get a valid configuration parser for a given filename. The filename‘s extension is used to instantiate a valid ParserInterface implementation.
Given a configuration filename, this function returns a configuration parser object that is able to read the values from the file.
# File core/config.rb, line 84
84: def Factory.from(file)
85: type = File.extname(file).to_sym
86:
87: @@factories.each do |parser|
88: parser.get_type() == type
89: return parser.new(file)
90: end
91: end