Class: Docopt::Optional
- Inherits:
-
ParentPattern
- Object
- Pattern
- ParentPattern
- Docopt::Optional
- Defined in:
- lib/docopt.rb
Direct Known Subclasses
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
314 315 316 317 318 319 320 |
# File 'lib/docopt.rb', line 314 def match(left, collected=nil) collected ||= [] for p in self.children _, left, collected = p.match(left, collected) end return [true, left, collected] end |