Class: Fakes::RegularArgMatcher
- Inherits:
-
Object
- Object
- Fakes::RegularArgMatcher
- Defined in:
- lib/fakes/arg_matching/regular_arg_matcher.rb
Instance Method Summary collapse
-
#initialize(value_to_match) ⇒ RegularArgMatcher
constructor
A new instance of RegularArgMatcher.
- #matches?(item) ⇒ Boolean
Constructor Details
#initialize(value_to_match) ⇒ RegularArgMatcher
Returns a new instance of RegularArgMatcher.
4 5 6 |
# File 'lib/fakes/arg_matching/regular_arg_matcher.rb', line 4 def initialize(value_to_match) @value_to_match = value_to_match end |
Instance Method Details
#matches?(item) ⇒ Boolean
8 9 10 |
# File 'lib/fakes/arg_matching/regular_arg_matcher.rb', line 8 def matches?(item) @value_to_match == item end |