Class: FlexMock::ProcMatcher
- Inherits:
-
Object
- Object
- FlexMock::ProcMatcher
- Defined in:
- lib/flexmock/argument_matchers.rb
Overview
Match only things where the block evaluates to true.
Instance Method Summary collapse
- #===(target) ⇒ Object
-
#initialize(&block) ⇒ ProcMatcher
constructor
A new instance of ProcMatcher.
- #inspect ⇒ Object
Constructor Details
#initialize(&block) ⇒ ProcMatcher
Returns a new instance of ProcMatcher.
45 46 47 |
# File 'lib/flexmock/argument_matchers.rb', line 45 def initialize(&block) @block = block end |
Instance Method Details
#===(target) ⇒ Object
48 49 50 |
# File 'lib/flexmock/argument_matchers.rb', line 48 def ===(target) @block.call(target) end |
#inspect ⇒ Object
51 52 53 |
# File 'lib/flexmock/argument_matchers.rb', line 51 def inspect "on{...}" end |