Class: Plumb::Pipeline::AroundStep

Inherits:
Object
  • Object
show all
Includes:
Composable
Defined in:
lib/plumb/pipeline.rb

Instance Method Summary collapse

Methods included from Composable

#&, #/, #>>, #[], #absorb_input, #absorb_output, #accepted_type, #as_node, #build, #check, #children, #defer, #fusable_step?, #fuse_with, #generate, #idempotent?, included, #invalid, #invoke, #match, #metadata, #not, #pipeline, #policy, resolve_operand, #static, #subtype_identity, #to_json_schema, #to_mermaid, #to_plumb_type, #to_s, #transform, #value, #value_preserving?, #where, #with, wrap, #|

Methods included from Callable

#parse, #resolve

Constructor Details

#initialize(step, block) ⇒ AroundStep

Returns a new instance of AroundStep.



12
13
14
15
# File 'lib/plumb/pipeline.rb', line 12

def initialize(step, block)
  @step = step
  @block = block
end

Instance Method Details

#call(result) ⇒ Object



17
18
19
# File 'lib/plumb/pipeline.rb', line 17

def call(result)
  @block.call(@step, result)
end

#input_typeObject

Opaque middleware wrapper (its wrapped step may be a plain proc), so its input/output types are unknown — Any (top). Opts out of #>> checks.



23
# File 'lib/plumb/pipeline.rb', line 23

def input_type = Types::Any

#output_typeObject



24
# File 'lib/plumb/pipeline.rb', line 24

def output_type = Types::Any