Permalink
Browse files

Inlined method.

  • Loading branch information...
1 parent 4c4ff79 commit e104ad185b7cbd6721030c868ca292399db91ecc Brian Takita committed Feb 1, 2010
Showing with 10 additions and 19 deletions.
  1. +10 −19 lib/rr/double_matches.rb
View
@@ -19,33 +19,24 @@ def find_all_matches(args)
if double.exact_match?(*args)
matching_doubles << double
if double.attempt?
- exact_double_is_terminal_or_non_terminal double
+ 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?
- wildcard_double_is_terminal_or_non_terminal double
+ if double.terminal?
+ wildcard_terminal_doubles_to_attempt << double
+ else
+ wildcard_non_terminal_doubles_to_attempt << double
+ end
end
end
end
self
end
-
- protected
- def exact_double_is_terminal_or_non_terminal(double)
- if double.terminal?
- exact_terminal_doubles_to_attempt << double
- else
- exact_non_terminal_doubles_to_attempt << double
- end
- end
-
- def wildcard_double_is_terminal_or_non_terminal(double)
- if double.terminal?
- wildcard_terminal_doubles_to_attempt << double
- else
- wildcard_non_terminal_doubles_to_attempt << double
- end
- end
end
end

0 comments on commit e104ad1

Please sign in to comment.