Class: Dry::Pipeline::Composite
- Inherits:
-
Object
- Object
- Dry::Pipeline::Composite
- Defined in:
- lib/dry/pipeline/composite.rb
Instance Attribute Summary collapse
-
#left ⇒ Object
readonly
Returns the value of attribute left.
-
#right ⇒ Object
readonly
Returns the value of attribute right.
Instance Method Summary collapse
- #>>(other) ⇒ Object
- #call(value) ⇒ Object (also: #[])
-
#initialize(left, right) ⇒ Composite
constructor
private
A new instance of Composite.
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
#left ⇒ Object (readonly)
Returns the value of attribute left.
4 5 6 |
# File 'lib/dry/pipeline/composite.rb', line 4 def left @left end |
#right ⇒ Object (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 |