class Porch::ClassStepDecorator

Attributes

step[R]

Public Class Methods

decorates?(step) click to toggle source
# File lib/porch/step_decorators/class_step_decorator.rb, line 15
def self.decorates?(step)
  step.is_a? Class
end
new(step, _organizer) click to toggle source
# File lib/porch/step_decorators/class_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/class_step_decorator.rb, line 9
def execute(context)
  ctx = Context.new(context)
  step.new.call ctx
  ctx
end