Module: Yaso::Stepable
- Included in:
- Service
- Defined in:
- lib/yaso/stepable.rb
Instance Method Summary collapse
Instance Method Details
#failure(object, **options, &block) ⇒ Object
18 19 20 21 22 23 24 25 |
# File 'lib/yaso/stepable.rb', line 18 def failure(object, **, &block) raise InvalidFirstStepError, :failure if flow == Logic::Classic && steps.empty? steps << { object: object, category: :failure, fast: .delete(:fast), on_success: .delete(:on_success), on_failure: .delete(:on_failure), options: , block: block, name: .delete(:name) } end |
#steps ⇒ Object
5 6 7 |
# File 'lib/yaso/stepable.rb', line 5 def steps @steps ||= [] end |