class Peggy::Positive
Positive
Predicate
. If found the original index is returned. If not NO_MATCH is returned.
Public Instance Methods
match(parser, index)
click to toggle source
Matches the child once. If found the original index is returned. If not found NO_MATCH is returned.
# File lib/parse/builder.rb, line 196 def match parser, index raise "positive element child not set" unless child found = child.match parser, index found ? index : NO_MATCH end
to_s()
click to toggle source
Convert element to String.
# File lib/parse/builder.rb, line 203 def to_s "&#{wrap}" end