module Trailblazer::Activity::DSL::Linear::DSL
Public Instance Methods
apply_adds_from_dsl(sequence, sequence_insert:, adds:, **options)
click to toggle source
Add one or several rows to the {sequence}. This is usually called from DSL
methods such as {step}.
# File lib/trailblazer/activity/dsl/linear.rb, line 178 def apply_adds_from_dsl(sequence, sequence_insert:, adds:, **options) # This is the ADDS for the actual task. task_add = {row: Sequence.create_row(**options), insert: sequence_insert} # Linear::Insert.method(:Prepend), end_id Sequence.apply_adds(sequence, [task_add] + adds) end
insert_task(sequence, sequence_insert:, **options)
click to toggle source
Insert
the task into the sequence using the {sequence_insert} strategy. @return Sequence
sequence after applied insertion FIXME: DSL
for strategies
# File lib/trailblazer/activity/dsl/linear.rb, line 169 def insert_task(sequence, sequence_insert:, **options) new_row = Sequence.create_row(**options) # {sequence_insert} is usually a function such as {Linear::Insert::Append} and its arguments. _seq = Sequence.insert_row(sequence, row: new_row, insert: sequence_insert) end