Class: Bogus::MatchesArgument
- Inherits:
-
Object
- Object
- Bogus::MatchesArgument
- Defined in:
- lib/bogus/stubbing/matchers/matches_argument.rb
Instance Method Summary collapse
- #==(argument) ⇒ Object
-
#initialize(&block) ⇒ MatchesArgument
constructor
A new instance of MatchesArgument.
Constructor Details
#initialize(&block) ⇒ MatchesArgument
Returns a new instance of MatchesArgument.
3 4 5 |
# File 'lib/bogus/stubbing/matchers/matches_argument.rb', line 3 def initialize(&block) @block = block end |
Instance Method Details
#==(argument) ⇒ Object
7 8 9 |
# File 'lib/bogus/stubbing/matchers/matches_argument.rb', line 7 def ==(argument) @block.call(argument) end |