Module: Smith::Workflow::SplitStepPersistence::SubclassBoundary

Defined in:
lib/smith/workflow/split_step_persistence/subclass_boundary.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.guardObject



44
45
46
47
48
49
50
51
52
53
54
# File 'lib/smith/workflow/split_step_persistence/subclass_boundary.rb', line 44

def self.guard
  Module.new.tap do |guard|
    instance_methods(false).each do |method_name|
      guard.define_method(method_name, instance_method(method_name))
    end
    private_instance_methods(false).each do |method_name|
      guard.define_method(method_name, instance_method(method_name))
      guard.send(:private, method_name)
    end
  end
end

.protect_execution_path!(workflow_class, *owners) ⇒ Object



8
9
10
11
12
# File 'lib/smith/workflow/split_step_persistence/subclass_boundary.rb', line 8

def protect_execution_path!(workflow_class, *owners)
  protected_method_names(owners).each do |method_name|
    protect_method!(workflow_class, method_name)
  end
end

Instance Method Details

#advance!Object



61
62
63
64
# File 'lib/smith/workflow/split_step_persistence/subclass_boundary.rb', line 61

def advance!
  SplitStepPersistence.instance_method(:guard_split_step_subclass_execution!).bind_call(self)
  super
end

#authorize_prepared_step_execution!Object



71
72
73
# File 'lib/smith/workflow/split_step_persistence/subclass_boundary.rb', line 71

def authorize_prepared_step_execution!(...)
  ExecutionAuthorizationIssuance.instance_method(:authorize_prepared_step_execution!).bind_call(self, ...)
end

#execute_prepared_composite_branch!Object



79
80
81
# File 'lib/smith/workflow/split_step_persistence/subclass_boundary.rb', line 79

def execute_prepared_composite_branch!(...)
  CompositeExecution.instance_method(:execute_prepared_composite_branch!).bind_call(self, ...)
end

#prepare_composite_step!Object



75
76
77
# File 'lib/smith/workflow/split_step_persistence/subclass_boundary.rb', line 75

def prepare_composite_step!(...)
  CompositeExecution.instance_method(:prepare_composite_step!).bind_call(self, ...)
end

#reduce_prepared_composite_step!Object



83
84
85
# File 'lib/smith/workflow/split_step_persistence/subclass_boundary.rb', line 83

def reduce_prepared_composite_step!(...)
  CompositeExecution.instance_method(:reduce_prepared_composite_step!).bind_call(self, ...)
end

#run!Object



66
67
68
69
# File 'lib/smith/workflow/split_step_persistence/subclass_boundary.rb', line 66

def run!
  SplitStepPersistence.instance_method(:guard_split_step_subclass_execution!).bind_call(self)
  super
end

#to_stateObject



56
57
58
59
# File 'lib/smith/workflow/split_step_persistence/subclass_boundary.rb', line 56

def to_state
  state = super
  split_step_boundary_active? ? snapshot_value(state) : state
end