module Arugula::MatchAll

Attributes

parts[RW]

Public Class Methods

new() click to toggle source
# File lib/arugula/parts.rb, line 36
def initialize
  @parts = []
end

Public Instance Methods

match(str, index, match_data) click to toggle source
# File lib/arugula/parts.rb, line 40
def match(str, index, match_data)
  parts.each do |part|
    match, index = part.match(str, index, match_data)
    return false, index unless match
  end
  [true, index]
end