Class: RSpec::Fakes::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.


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