Class: TTY::ProgressBar::TotalFormatter Private
- Inherits:
-
Object
- Object
- TTY::ProgressBar::TotalFormatter
- Defined in:
- lib/tty/progressbar/formatter/total.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 :total token
Instance Method Summary collapse
-
#call(value) ⇒ Object
Format :total token.
Instance Method Details
#call(value) ⇒ Object
Format :total token
19 20 21 22 |
# File 'lib/tty/progressbar/formatter/total.rb', line 19 def call(value) display = @progress.indeterminate? ? "-" : @progress.total.to_s value.gsub(matcher, display) end |