Module: Metaractor::RunWithContext

Defined in:
lib/metaractor/run_with_context.rb

Instance Method Summary collapse

Instance Method Details

#_build_context(context = {}) ⇒ Object



14
15
16
# File 'lib/metaractor/run_with_context.rb', line 14

def _build_context(context = {})
  @context = Interactor::Context.build(context) unless context.empty?
end

#run(context = {}) ⇒ Object

Grab context at run and set things up.



4
5
6
7
# File 'lib/metaractor/run_with_context.rb', line 4

def run(context = {})
  _build_context context
  super()
end

#run!(context = {}) ⇒ Object



9
10
11
12
# File 'lib/metaractor/run_with_context.rb', line 9

def run!(context = {})
  _build_context context
  super()
end