Class: TTY::ProgressBar::MeanRateFormatter Private
- Inherits:
-
Object
- Object
- TTY::ProgressBar::MeanRateFormatter
- Defined in:
- lib/tty/progressbar/formatter/mean_rate.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Used by Pipeline to format :mean_rate token
Instance Method Summary collapse
-
#call(value) ⇒ Object
Format :mean_rate token.
Instance Method Details
#call(value) ⇒ Object
Format :mean_rate token
20 21 22 23 |
# File 'lib/tty/progressbar/formatter/mean_rate.rb', line 20 def call(value) formatted = Converter.to_seconds(@progress.mean_rate) value.gsub(matcher, formatted) end |