Class: DevelopWithPassion::Fakes::RSpec::BlockCriteria
- Inherits:
-
Object
- Object
- DevelopWithPassion::Fakes::RSpec::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.
5 6 7 |
# File 'lib/core/block_criteria.rb', line 5 def initialize(condition_block) @condition_block = condition_block end |
Instance Method Details
#is_satisfied_by(item) ⇒ Object
8 9 10 |
# File 'lib/core/block_criteria.rb', line 8 def is_satisfied_by(item) return @condition_block.call(item) end |