Class: DevelopWithPassion::Fakes::RSpec::BlockCriteria

Inherits:
Object
  • Object
show all
Defined in:
lib/core/block_criteria.rb

Instance Method Summary collapse

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