lib/balboa/cli/parser.rb in balboa-0.1.6 vs lib/balboa/cli/parser.rb in balboa-0.1.7

- old
+ new

@@ -8,20 +8,20 @@ class Parser def self.parse(*args) new(*args).parse end - def initialize(argv, default_config) - @config = default_config + def initialize(argv) + @config = {} @argv = argv @parser = OptionParser.new end def parse configure_parser - @parser.parse!(@argv) + @config end private def configure_parser @@ -58,9 +58,10 @@ def set_custom_defaults message = 'Read configuration options from FILE' @parser.on('-c', '--config \'FILE\'', message) do |file| @config.merge!(YAML.load_file(file)) + @config['skip_defaults'] = true end end # :reek:TooManyStatements def set_attributes