class Porch::ProcStepDecorator

Attributes

step[R]

Public Class Methods

decorates?(step) click to toggle source
# File lib/porch/step_decorators/proc_step_decorator.rb, line 15
def self.decorates?(step)
  step.is_a? Proc
end
new(step, _organizer) click to toggle source
# File lib/porch/step_decorators/proc_step_decorator.rb, line 5
def initialize(step, _organizer)
  @step = step
end

Public Instance Methods

execute(context) click to toggle source
# File lib/porch/step_decorators/proc_step_decorator.rb, line 9
def execute(context)
  ctx = Context.new(context)
  step.call ctx
  ctx
end