Class: Command::StringArgument
- Defined in:
- lib/command-set/arguments.rb
Overview
Liberally accepts any string as input
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from Argument
Instance Method Summary collapse
- #complete(prefix, subject) ⇒ Object
-
#initialize(name, string) ⇒ StringArgument
constructor
A new instance of StringArgument.
- #validate(term, subject) ⇒ Object
Methods inherited from Argument
#check_present, #consume, #consume_hash, #match_terms, #omittable?, #parse, register, #required?
Constructor Details
#initialize(name, string) ⇒ StringArgument
Returns a new instance of StringArgument.
337 338 339 340 |
# File 'lib/command-set/arguments.rb', line 337 def initialize(name, string) super(name) @description = string end |
Instance Method Details
#complete(prefix, subject) ⇒ Object
342 343 344 |
# File 'lib/command-set/arguments.rb', line 342 def complete(prefix, subject) return [@description, ""] end |
#validate(term, subject) ⇒ Object
346 347 348 |
# File 'lib/command-set/arguments.rb', line 346 def validate(term, subject) return true end |