Class: Bonito::ProgressLogger
- Inherits:
-
Object
- Object
- Bonito::ProgressLogger
- Includes:
- ProgressCounter
- Defined in:
- lib/bonito/progress.rb
Overview
:nodoc:
Instance Attribute Summary
Attributes included from ProgressCounter
Instance Method Summary collapse
-
#initialize(logger = Logger.new(STDOUT), **opts) ⇒ ProgressLogger
constructor
A new instance of ProgressLogger.
- #on_increment(_increment) ⇒ Object
Methods included from ProgressCounter
included, #increment, #setup, #to_s
Constructor Details
#initialize(logger = Logger.new(STDOUT), **opts) ⇒ ProgressLogger
Returns a new instance of ProgressLogger.
54 55 56 57 |
# File 'lib/bonito/progress.rb', line 54 def initialize(logger = Logger.new(STDOUT), **opts) @logger = logger setup opts end |
Instance Method Details
#on_increment(_increment) ⇒ Object
59 60 61 |
# File 'lib/bonito/progress.rb', line 59 def on_increment(_increment) @logger.info to_s end |