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, match_data) ⇒ Object



190
191
192
193
194
195
# File 'lib/arugula/parts.rb', line 190

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

#to_sObject



186
187
188
# File 'lib/arugula/parts.rb', line 186

def to_s
  "#{wrapped}*"
end