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