Class: Transducers::PreservingReduced Private
- Inherits:
-
Object
- Object
- Transducers::PreservingReduced
- Defined in:
- lib/transducers.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Method Summary collapse
- #apply(reducer) ⇒ Object private
- #step(result, input) ⇒ Object private
Instance Method Details
#apply(reducer) ⇒ Object
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.
164 165 166 |
# File 'lib/transducers.rb', line 164 def apply(reducer) @reducer = reducer end |
#step(result, input) ⇒ Object
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.
168 169 170 171 |
# File 'lib/transducers.rb', line 168 def step(result, input) ret = @reducer.step(result, input) Reduced === ret ? Reduced.new(ret) : ret end |