Class: Command::RestOfLineArgument
- Inherits:
-
StringArgument
- Object
- Argument
- StringArgument
- Command::RestOfLineArgument
- Defined in:
- lib/command-set/arguments.rb
Overview
Consumes the rest of the line as a space separated string. Useful for commands with sentences as their arguments.
Instance Attribute Summary
Attributes inherited from Argument
Instance Method Summary collapse
Methods inherited from StringArgument
Methods inherited from Argument
#basis, #check_present, #complete, #consume_hash, #initialize, #match_terms, #names, #omittable?, #parse, register, #required?, #subject_requirements, #validate
Constructor Details
This class inherits a constructor from Command::Argument
Instance Method Details
#consume(subject, arguments) ⇒ Object
377 378 379 380 381 |
# File 'lib/command-set/arguments.rb', line 377 def consume(subject, arguments) term = arguments.join(" ") arguments.clear return {@name => term} end |