Module: FlowCore::TransitionCallbackable

Extended by:
ActiveSupport::Concern
Included in:
TransitionCallback
Defined in:
lib/flow_core/transition_callbackable.rb

Instance Method Summary collapse

Instance Method Details

#_call(_task, *_args) ⇒ Object

Raises:

  • (NotImplementedError)


22
23
24
# File 'lib/flow_core/transition_callbackable.rb', line 22

def _call(_task, *_args)
  raise NotImplementedError
end

#call(task, *args) ⇒ Object



26
27
28
29
30
31
# File 'lib/flow_core/transition_callbackable.rb', line 26

def call(task, *args)
  return unless on.include? task.stage.to_sym
  return unless callable? task

  _call task, *args
end

#callable?(_task) ⇒ Boolean

Returns:

  • (Boolean)


18
19
20
# File 'lib/flow_core/transition_callbackable.rb', line 18

def callable?(_task)
  true
end

#onObject

Should in :created, :enabled, :finished, :terminated, :errored, :rescued :suspended, :resumed



14
15
16
# File 'lib/flow_core/transition_callbackable.rb', line 14

def on
  []
end