Method: Ame::Argument#process

Defined in:
lib/ame-1.0/argument.rb

#process(options, processed, arguments) ⇒ Object

Invokes the optional block passed to the receiver when it was created for additional validation and parsing after optionally parsing one or more of the ARGUMENTS passed to it (see subclasses’ #parse methods for their behaviour).

Parameters:

  • options (Hash<String, Object>)
  • processed (Array<String>)
  • arguments (Array<String>)

Returns:

  • (Object)

Raises:



44
45
46
47
48
# File 'lib/ame-1.0/argument.rb', line 44

def process(options, processed, arguments)
  @validate.call(options, processed, parse(arguments))
rescue Ame::MalformedArgument, ArgumentError, TypeError => e
  raise Ame::MalformedArgument, '%s: %s' % [self, e]
end