Class: Arugula::StarPart

Inherits:
Part
  • Object
show all
Includes:
Wrapping
Defined in:
lib/arugula/parts.rb

Instance Attribute Summary

Attributes included from Wrapping

#wrapped

Instance Method Summary collapse

Methods included from Wrapping

#initialize

Methods inherited from Part

all, inherited, type

Instance Method Details

#match(str, index) ⇒ Object



172
173
174
175
176
177
# File 'lib/arugula/parts.rb', line 172

def match(str, index)
  loop do
    matches, index = wrapped.match(str, index)
    return true, index unless matches
  end
end

#to_sObject



168
169
170
# File 'lib/arugula/parts.rb', line 168

def to_s
  "#{wrapped}*"
end