Module: Hubbado::Sequence::RunSequence

Defined in:
lib/hubbado/sequence/run_sequence.rb

Overview

Mixed into controllers (or other top-level boundaries that cannot take injected dependencies because their lifecycle is owned by the framework). Wraps Runner so the calling site reads ‘run_sequence SomeSeq do |r| … end` while a single `sequencer_arguments` override handles per-host kwargs injection (current_user, params, etc.).

Instance Method Summary collapse

Instance Method Details

#run_sequence(sequencer_class, **kwargs, &block) ⇒ Object



9
10
11
# File 'lib/hubbado/sequence/run_sequence.rb', line 9

def run_sequence(sequencer_class, **kwargs, &block)
  sequence_runner.(sequencer_class, **sequencer_arguments(kwargs), &block)
end

#sequencer_arguments(kwargs) ⇒ Object

Override in the host (controller, job) to inject defaults like current_user without forcing every call site to pass them.



15
16
17
# File 'lib/hubbado/sequence/run_sequence.rb', line 15

def sequencer_arguments(kwargs)
  kwargs
end