builderator
builderator copied to clipboard
Config.load should grok the file type passed to it and parse appropriately
Per @fmitchell-r7's comment in #9 (https://github.com/rapid7/builderator/pull/9#discussion_r46425230):
I'm not a fan of encoding type information in method names, since it leads to an explosion of methods as more supported types are added. I want to be able to write code like
Config.load 'config.rb' Config.load 'config.json' Config.load 'config.ini'
and have the
Config::File
class make a best guess as to what type of file it's loading. If it makes the wrong guess, I should be able to explicitly specify type.Config.load 'config.properties', :type => :java