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