class ProgeressLogger
Public Class Methods
new()
click to toggle source
# File lib/s3streambackup.rb, line 109 def initialize @bytes = 0 end
Public Instance Methods
<<(bytes)
click to toggle source
# File lib/s3streambackup.rb, line 120 def <<(bytes) @bytes += bytes end
<=>(value)
click to toggle source
# File lib/s3streambackup.rb, line 129 def <=>(value) @bytes <=> value end
in_bytes_auto()
click to toggle source
# File lib/s3streambackup.rb, line 133 def in_bytes_auto @bytes.in_bytes_auto end
log(logger, postfix)
click to toggle source
# File lib/s3streambackup.rb, line 113 def log(logger, postfix) if logger.debug? was, @output_bytes = @output_bytes || '', @bytes.in_bytes_auto logger.debug "#{@output_bytes}#{postfix}" end end
to_s()
click to toggle source
# File lib/s3streambackup.rb, line 124 def to_s @bytes.to_s end