Class: Bonito::ProgressLogger

Inherits:
Object
  • Object
show all
Includes:
ProgressCounter
Defined in:
lib/bonito/progress.rb

Overview

:nodoc:

Instance Attribute Summary

Attributes included from ProgressCounter

#current, #total

Instance Method Summary collapse

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