Class: CWG::Progress

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

Instance Method Summary (collapse)

Constructor Details

- (Progress) initialize(title)

Returns a new instance of Progress



9
10
11
# File '/Users/martyn/cw/cw_clone/lib/cw/progress.rb', line 9

def initialize(title)
  @title = title
end

Instance Method Details

- (Object) increment



24
25
26
# File '/Users/martyn/cw/cw_clone/lib/cw/progress.rb', line 24

def increment
  @progress.increment
end

- (Object) init(size)



13
14
15
16
17
18
19
20
21
22
# File '/Users/martyn/cw/cw_clone/lib/cw/progress.rb', line 13

def init size
  @progress =
    ProgressBar.
    create(total: size,
           title: 'Compiling',
           progress_mark: '.',
           length: 40,
           output: Print::ProgressPrint.new,
           format: "%t: |%B| %p% ")
end