class KPeg::Collect
Attributes
op[R]
Public Class Methods
new(op)
click to toggle source
Calls superclass method
KPeg::Operator::new
# File lib/kpeg/grammar.rb, line 575 def initialize(op) super() @op = op end
Public Instance Methods
==(obj)
click to toggle source
Calls superclass method
# File lib/kpeg/grammar.rb, line 589 def ==(obj) case obj when Collect @op == obj.op else super end end
inspect()
click to toggle source
# File lib/kpeg/grammar.rb, line 598 def inspect inspect_type "collect", @op.inspect end
match(x)
click to toggle source
# File lib/kpeg/grammar.rb, line 582 def match(x) start = x.pos if @op.match(x) MatchString.new(self, x.string[start..x.pos]) end end