Class: RSpec::Fakes::BlockCriteria
- Inherits:
-
Object
- Object
- RSpec::Fakes::BlockCriteria
- Defined in:
- lib/core/block_criteria.rb
Instance Method Summary collapse
-
#initialize(condition_block) ⇒ BlockCriteria
constructor
A new instance of BlockCriteria.
- #is_satisfied_by(item) ⇒ Object
Constructor Details
#initialize(condition_block) ⇒ BlockCriteria
Returns a new instance of BlockCriteria.
4 5 6 |
# File 'lib/core/block_criteria.rb', line 4 def initialize(condition_block) @condition_block = condition_block end |
Instance Method Details
#is_satisfied_by(item) ⇒ Object
7 8 9 |
# File 'lib/core/block_criteria.rb', line 7 def is_satisfied_by(item) return @condition_block.call(item) end |