Class: Docopt::Required
- Inherits:
-
ParentPattern
- Object
- Pattern
- ParentPattern
- Docopt::Required
- Defined in:
- lib/docopt.rb
Instance Attribute Summary
Attributes inherited from ParentPattern
Attributes inherited from Pattern
Instance Method Summary collapse
Methods inherited from ParentPattern
Methods inherited from Pattern
#==, #dump, #either, #fix, #fix_identities, #fix_repeating_arguments, #to_str
Constructor Details
This class inherits a constructor from Docopt::ParentPattern
Instance Method Details
#match(left, collected = nil) ⇒ Object
298 299 300 301 302 303 304 305 306 307 308 309 310 |
# File 'lib/docopt.rb', line 298 def match(left, collected=nil) collected ||= [] l = left c = collected for p in self.children matched, l, c = p.match(l, c) if not matched return [false, left, collected] end end return [true, l, c] end |