class TTY::ProgressBar::ByteRateFormatter
Used by {Pipeline} to format :byte_rate token
@api private
Public Instance Methods
call(value)
click to toggle source
Format :byte_rate token
@param [String] value
the value to format
@api public
# File lib/tty/progressbar/formatter/byte_rate.rb, line 20 def call(value) formatted = Converter.to_bytes(@progress.rate) value.gsub(matcher, formatted) end