Module: WorkflowTemplate::Definer::HasActions::Nested::Unprepared
Instance Method Summary
collapse
Methods included from Redefine
#redefine_onto
#describe
#actions, #freeze
Methods included from Dsl
#append_action, #apply, #inside_action, #prepend_action, #remove_action, #replace_action, #wrap_template
Instance Method Details
#prepare(*args) ⇒ Object
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
# File 'lib/workflow_template/definer/has_actions/nested.rb', line 24
def prepare(*args)
unprepared = self
target = Module.new do
extend Prepared
define_singleton_method :unprepared do
unprepared
end
end
actions.wrapper.each do |action|
target.send :store_wrapper_action, action.prepare(*args)
end
actions.simple.each do |action|
position = Position.instance(:after, nil)
target.send :store_action, action.prepare(*args), position
end
target.freeze
end
|
#redefine(&block) ⇒ Object
45
46
47
|
# File 'lib/workflow_template/definer/has_actions/nested.rb', line 45
def redefine(&block)
redefine_onto(Unprepared, &block)
end
|