Class: Processor::Subroutine::Counter
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- Processor::Subroutine::Counter
- Defined in:
- lib/processor/subroutine/counter.rb
Instance Method Summary collapse
Instance Method Details
#process ⇒ Object
6 7 8 9 |
# File 'lib/processor/subroutine/counter.rb', line 6 def process(*) super record_processed end |
#processed_records_count ⇒ Object
15 16 17 |
# File 'lib/processor/subroutine/counter.rb', line 15 def processed_records_count @processed_records_count ||= 0 end |
#remaining_records_count ⇒ Object
11 12 13 |
# File 'lib/processor/subroutine/counter.rb', line 11 def remaining_records_count [ total_records - processed_records_count, 0 ].max end |