class Docopt::ParentPattern
Attributes
children[RW]
Public Class Methods
new(*children)
click to toggle source
# File lib/docopt.rb, line 180 def initialize(*children) @children = children end
Public Instance Methods
flat(*types)
click to toggle source
# File lib/docopt.rb, line 189 def flat(*types) if types.include?(self.class) [self] else self.children.map { |c| c.flat(*types) }.flatten end end
inspect()
click to toggle source
# File lib/docopt.rb, line 184 def inspect childstr = self.children.map { |a| a.inspect } return "#{self.class.name}(#{childstr.join(", ")})" end