class RR::DoubleMatches

Attributes

exact_non_terminal_doubles_to_attempt[R]
exact_terminal_doubles_to_attempt[R]
matching_doubles[R]
wildcard_non_terminal_doubles_to_attempt[R]
wildcard_terminal_doubles_to_attempt[R]

Public Instance Methods

find_all_matches(args) click to toggle source
# File lib/rr/double_matches.rb, line 18
def find_all_matches(args)
  @doubles.each do |double|
    if double.exact_match?(*args)
      matching_doubles << double
      if double.attempt?
        if double.terminal?
          exact_terminal_doubles_to_attempt << double
        else
          exact_non_terminal_doubles_to_attempt << double
        end
      end
    elsif double.wildcard_match?(*args)
      matching_doubles << double
      if double.attempt?
        if double.terminal?
          wildcard_terminal_doubles_to_attempt << double
        else
          wildcard_non_terminal_doubles_to_attempt << double
        end
      end
    end
  end
  self
end