Class: Planter::ProgressBar
- Inherits:
-
Object
- Object
- Planter::ProgressBar
- Defined in:
- lib/planter/progress_bar.rb
Overview
Builds progress bars for seed runs.
Defined Under Namespace
Classes: NullProgressBar
Constant Summary collapse
- FORMAT =
"%t |%B| %p%% %c/%C"
Class Method Summary collapse
Class Method Details
.create(title:, total:, output: $stdout) ⇒ Object
16 17 18 19 20 21 22 23 24 25 |
# File 'lib/planter/progress_bar.rb', line 16 def self.create(title:, total:, output: $stdout) return NullProgressBar.new unless enabled?(total) ::ProgressBar.create( title: title, total: total, output: output, format: FORMAT ) end |