class TTY::ProgressBar::MeanByteFormatter

Used by {Pipeline} to format :mean_byte token

@api private

Public Instance Methods

call(value) click to toggle source

Format :mean_byte token

@param [String] value

the value being formatted

@api public

# File lib/tty/progressbar/formatter/mean_byte.rb, line 20
def call(value)
  formatted = Converter.to_bytes(@progress.mean_rate)
  value.gsub(matcher, formatted)
end