Class: Textus::Workflow::StepExecutor::StepScope

Inherits:
Object
  • Object
show all
Includes:
Textus::Workflow::StepHelpers
Defined in:
lib/textus/workflow/step_executor.rb

Instance Method Summary collapse

Methods included from Textus::Workflow::StepHelpers

#check_naming, #fetch_json, #merge_hashes, #pluck, #render_template

Constructor Details

#initialize(data, ctx) ⇒ StepScope

Returns a new instance of StepScope.



13
14
15
16
# File 'lib/textus/workflow/step_executor.rb', line 13

def initialize(data, ctx)
  @data = data
  @ctx  = ctx
end

Instance Method Details

#call(callable) ⇒ Object



18
19
20
# File 'lib/textus/workflow/step_executor.rb', line 18

def call(callable)
  instance_exec(@data, @ctx, &callable)
end