Class: Command::StringArgument

Inherits:
Argument
  • Object
show all
Defined in:
lib/command-set/arguments.rb

Overview

Liberally accepts any string as input

Direct Known Subclasses

RestOfLineArgument

Instance Attribute Summary

Attributes inherited from Argument

#name

Instance Method Summary collapse

Methods inherited from Argument

#basis, #check_present, #consume, #consume_hash, #initialize, #match_terms, #names, #omittable?, #parse, register, #required?, #subject_requirements

Constructor Details

This class inherits a constructor from Command::Argument

Instance Method Details

#complete(terms, prefix, subject) ⇒ Object



363
364
365
# File 'lib/command-set/arguments.rb', line 363

def complete(terms, prefix, subject)
  return [basis(subject), ""]
end

#validate(term, subject) ⇒ Object



367
368
369
# File 'lib/command-set/arguments.rb', line 367

def validate(term, subject)
  return true
end