Class: XOptionParser::Switch::FlagArgument

Inherits:
PlacedArgument
  • Object
show all
Defined in:
lib/xoptparse.rb

Instance Method Summary collapse

Instance Method Details

#parse(arg, argv, &error) ⇒ Object



244
245
246
247
248
249
250
# File 'lib/xoptparse.rb', line 244

def parse(arg, argv, &error)
  if !arg && (argv.empty? || /\A-/ =~ argv[0])
    conv_arg(arg)
  else
    super(arg, argv, &error)
  end
end