Class: CW::Progress
- Inherits:
-
Object
- Object
- CW::Progress
- Defined in:
- lib/cw/progress.rb
Instance Method Summary collapse
- #increment ⇒ Object
- #init(size) ⇒ Object
-
#initialize(title) ⇒ Progress
constructor
A new instance of Progress.
Constructor Details
#initialize(title) ⇒ Progress
Returns a new instance of Progress.
8 9 10 |
# File 'lib/cw/progress.rb', line 8 def initialize(title) @title = title end |
Instance Method Details
#increment ⇒ Object
23 24 25 |
# File 'lib/cw/progress.rb', line 23 def increment @progress.increment end |
#init(size) ⇒ Object
12 13 14 15 16 17 18 19 20 21 |
# File 'lib/cw/progress.rb', line 12 def init size @progress = ProgressBar. create(total: size, title: 'Compiling', progress_mark: '.', length: 40, output: Print::ProgressPrint.new, format: "%t: |%B| %p% ") end |