class Docopt::Optional

Public Instance Methods

match(left, collected=nil) click to toggle source
# 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