Class: RactorPool::Reducer
- Inherits:
-
Object
- Object
- RactorPool::Reducer
- Defined in:
- lib/ractor_pool/reducer.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#logger ⇒ Object
readonly
Returns the value of attribute logger.
-
#result ⇒ Object
readonly
Returns the value of attribute result.
Instance Method Summary collapse
- #initial_value ⇒ Object
-
#initialize(logger:) ⇒ Reducer
constructor
A new instance of Reducer.
Constructor Details
#initialize(logger:) ⇒ Reducer
Returns a new instance of Reducer.
6 7 8 9 |
# File 'lib/ractor_pool/reducer.rb', line 6 def initialize(logger:) @logger = logger @result = initial_value end |
Instance Attribute Details
#logger ⇒ Object (readonly)
Returns the value of attribute logger.
4 5 6 |
# File 'lib/ractor_pool/reducer.rb', line 4 def logger @logger end |
#result ⇒ Object (readonly)
Returns the value of attribute result.
4 5 6 |
# File 'lib/ractor_pool/reducer.rb', line 4 def result @result end |
Instance Method Details
#initial_value ⇒ Object
11 12 13 |
# File 'lib/ractor_pool/reducer.rb', line 11 def initial_value raise NotImplementedError end |