Method: Command::Named#consume

Defined in:
lib/command-set/arguments.rb

#consume(subject, arguments) ⇒ Object



435
436
437
438
439
440
441
442
# File 'lib/command-set/arguments.rb', line 435

def consume(subject, arguments)
  if arguments.first == name
    arguments.shift
    return decorated.consume(subject,arguments)
  else
    raise ArgumentInvalidException, "Name \"#{name}\" required."
  end
end