Class: Transducers::BaseTransducer Private

Inherits:
Object
  • Object
show all
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.

Class Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(handler, &block) ⇒ BaseTransducer

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 BaseTransducer.



216
217
218
219
# File 'lib/transducers.rb', line 216

def initialize(handler, &block)
  @handler = handler
  @block = block
end

Class Attribute Details

.reducer_classObject (readonly)

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.



208
209
210
# File 'lib/transducers.rb', line 208

def reducer_class
  @reducer_class
end

Class Method Details

.define_reducer_class(&block) ⇒ 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.



210
211
212
213
# File 'lib/transducers.rb', line 210

def define_reducer_class(&block)
  @reducer_class = Class.new(WrappingReducer)
  @reducer_class.class_eval(&block)
end

Instance Method Details

#reducer_classObject

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.



221
222
223
# File 'lib/transducers.rb', line 221

def reducer_class
  self.class.reducer_class
end