Class: CW::Progress

Inherits:
Object
  • Object
show all
Defined in:
lib/cw/progress.rb

Instance Method Summary collapse

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

#incrementObject



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