Class: DLogReader::Distributer
- Inherits:
-
Object
- Object
- DLogReader::Distributer
- Defined in:
- lib/distributed_logreader/distributer.rb
Instance Attribute Summary collapse
-
#worker ⇒ Object
Returns the value of attribute worker.
Instance Method Summary collapse
-
#initialize(worker) ⇒ Distributer
constructor
A new instance of Distributer.
- #process(line) ⇒ Object
Constructor Details
#initialize(worker) ⇒ Distributer
Returns a new instance of Distributer.
5 6 7 |
# File 'lib/distributed_logreader/distributer.rb', line 5 def initialize(worker) self.worker = worker end |
Instance Attribute Details
#worker ⇒ Object
Returns the value of attribute worker.
3 4 5 |
# File 'lib/distributed_logreader/distributer.rb', line 3 def worker @worker end |
Instance Method Details
#process(line) ⇒ Object
9 10 11 |
# File 'lib/distributed_logreader/distributer.rb', line 9 def process(line) worker.call(line) end |