class ArgumentParser

Public Instance Methods

new() click to toggle source
Calls superclass method
# File lib/argument_parser.rb, line 2
def new
  @instance ||= super
end
parse_arguments(args) click to toggle source
# File lib/argument_parser.rb, line 6
def parse_arguments(args)
  last = args.pop
  array = args
  hash = {}
  if last.is_a?(Hash)
    hash = last
  elsif last
    array << last
  end
  [array, hash]
end