class Waterfall::WhenTruthy
Public Class Methods
new(root)
click to toggle source
# File lib/waterfall/predicates/when_truthy.rb, line 4 def initialize(root) @root = root end
Public Instance Methods
call() { |*yield_args| ... }
click to toggle source
# File lib/waterfall/predicates/when_truthy.rb, line 8 def call @output = yield(*yield_args) end
condition?()
click to toggle source
# File lib/waterfall/predicates/when_truthy.rb, line 19 def condition? @output end
dam() { |*yield_args| ... }
click to toggle source
# File lib/waterfall/predicates/when_truthy.rb, line 12 def dam if !@root.dammed? && condition? @root.dam yield(*yield_args) end @root end