Class: Bogus::MatchesArgument

Inherits:
Object
  • Object
show all
Defined in:
lib/bogus/stubbing/matchers/matches_argument.rb

Instance Method Summary collapse

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