Class: Peggy::AtLeastOne

Inherits:
Multiple show all
Defined in:
lib/parse/builder.rb

Overview

Matcher of 1 or more times.

Constant Summary

Constants inherited from Multiple

Multiple::MANY

Instance Attribute Summary

Attributes inherited from Multiple

#range

Attributes included from OneChild

#child

Instance Method Summary collapse

Methods inherited from Multiple

#match

Methods included from OneChild

#wrap

Methods inherited from Element

build, #match, #report

Constructor Details

#initializeAtLeastOne

Returns a new instance of AtLeastOne.



162
163
164
# File 'lib/parse/builder.rb', line 162

def initialize
  super 1..MANY
end

Instance Method Details

#to_sObject

Convert element to String.



167
168
169
# File 'lib/parse/builder.rb', line 167

def to_s
  "#{wrap}+"
end