class Planter::ProgressBar
Builds progress bars for seed runs.
Constants
- FORMAT
-
The format string used by visible progress bars.
@return [String]
Public Class Methods
Source
# File lib/planter/progress_bar.rb, line 32 def self.create(title:, total:, output: $stdout) return NullProgressBar.new unless enabled?(total) ::ProgressBar.create( title: title, total: total, output: output, format: FORMAT ) end
Create a visible progress bar, or a null progress bar when disabled.
@param [String] title progress bar title @param [Integer] total total number of records to seed @param [IO] output progress bar output stream
@return [ProgressBar, NullProgressBar]