class Peggy::Optional

Matcher of 0 or 1 time.

Public Class Methods

new() click to toggle source
Calls superclass method Peggy::Multiple::new
# File lib/parse/builder.rb, line 174
def initialize
  super 0..1
end

Public Instance Methods

to_s() click to toggle source

Convert element to String.

# File lib/parse/builder.rb, line 179
def to_s
  "#{wrap}?"
end