Class: Dry::Pipeline::Composite

Inherits:
Object
  • Object
show all
Defined in:
lib/dry/pipeline/composite.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(left, right) ⇒ Composite

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Composite.



8
9
10
11
# File 'lib/dry/pipeline/composite.rb', line 8

def initialize(left, right)
  @left = left
  @right = right
end

Instance Attribute Details

#leftObject (readonly)

Returns the value of attribute left.



4
5
6
# File 'lib/dry/pipeline/composite.rb', line 4

def left
  @left
end

#rightObject (readonly)

Returns the value of attribute right.



5
6
7
# File 'lib/dry/pipeline/composite.rb', line 5

def right
  @right
end

Instance Method Details

#>>(other) ⇒ Object



18
19
20
# File 'lib/dry/pipeline/composite.rb', line 18

def >>(other)
  self.class.new(self, other)
end

#call(value) ⇒ Object Also known as: []



13
14
15
# File 'lib/dry/pipeline/composite.rb', line 13

def call(value)
  right.(left.(value))
end