module Arugula::MatchAny
Attributes
parts[RW]
Public Class Methods
new()
click to toggle source
# File lib/arugula/parts.rb, line 58 def initialize @parts = [] end
Public Instance Methods
match(str, index, match_data)
click to toggle source
# File lib/arugula/parts.rb, line 62 def match(str, index, match_data) parts.each do |part| matches, match_index = part.match(str, index, match_data) return true, match_index if matches end [false, index] end