Class: Fakes::RegularArgMatcher

Inherits:
Object
  • Object
show all
Defined in:
lib/fakes/arg_matching/regular_arg_matcher.rb

Instance Method Summary collapse

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

Returns:

  • (Boolean)


8
9
10
# File 'lib/fakes/arg_matching/regular_arg_matcher.rb', line 8

def matches?(item)
  @value_to_match == item
end