lib/mercenary/command.rb in mercenary-0.3.3 vs lib/mercenary/command.rb in mercenary-0.3.4
- old
+ new
@@ -90,11 +90,11 @@
#
# Returns nothing
def option(sym, *options)
new_option = Option.new(sym, options)
@options << new_option
- @map[new_option.hash] = sym
+ @map[new_option] = sym
end
# Public: Adds a subcommand
#
# cmd_name - the name of the command
@@ -176,10 +176,10 @@
#
# Returns nothing
def process_options(opts, config)
options.each do |option|
opts.on(*option.for_option_parser) do |x|
- config[map[option.hash]] = x
+ config[map[option]] = x
end
end
end
# Public: Add version and help options to the command