Class: Core::Pipeline::Actions::Method

Inherits:
Core::Pipeline::Action show all
Defined in:
lib/core/pipeline/actions/method.rb

Overview

public

A pipeline action defined as a method.

Instance Attribute Summary

Attributes inherited from Core::Pipeline::Action

#after, #before, #name

Instance Method Summary collapse

Methods inherited from Core::Pipeline::Action

build

Constructor Details

#initialize(name = nil, before:, after:) ⇒ Method

Returns a new instance of Method.



9
10
11
12
13
14
# File 'lib/core/pipeline/actions/method.rb', line 9

def initialize(name = nil, before:, after:)
  @name = name
  @method = nil

  super(before: before, after: after)
end

Instance Method Details

#finalize(context) ⇒ Object

public


18
19
20
# File 'lib/core/pipeline/actions/method.rb', line 18

def finalize(context)
  context.method(@name).to_proc
end