Class: Waterfall::OnDam

Inherits:
Base
  • Object
show all
Defined in:
lib/waterfall/predicates/on_dam.rb

Instance Method Summary collapse

Methods inherited from Base

#waterfall?, #yield_args

Constructor Details

#initialize(root) ⇒ OnDam

Returns a new instance of OnDam.



4
5
6
# File 'lib/waterfall/predicates/on_dam.rb', line 4

def initialize(root)
  @root = root
end

Instance Method Details

#call {|@root.error_pool, @root.outflow, @root| ... } ⇒ Object

Yields:



8
9
10
11
# File 'lib/waterfall/predicates/on_dam.rb', line 8

def call
  return unless @root.dammed?
  yield @root.error_pool, @root.outflow, @root
end