Class: Yaso::Logic::Pass

Inherits:
Base
  • Object
show all
Defined in:
lib/yaso/logic/pass.rb

Instance Attribute Summary

Attributes inherited from Base

#name, #on_failure, #on_success

Instance Method Summary collapse

Methods inherited from Base

#add_failure, #add_next_step, #initialize

Constructor Details

This class inherits a constructor from Yaso::Logic::Base

Instance Method Details

#call(context, instance) ⇒ Object



6
7
8
9
# File 'lib/yaso/logic/pass.rb', line 6

def call(context, instance)
  instance.success = true
  @invocable.call(context, instance) ? @next_step : @failure
end