Class: Archimate::ProgressIndicator

Inherits:
Object
  • Object
show all
Defined in:
lib/archimate/progress_indicator.rb

Defined Under Namespace

Classes: FakeProgressBar

Instance Method Summary collapse

Constructor Details

#initialize(total: 100, title: "ArchiMate!") ⇒ ProgressIndicator

Returns a new instance of ProgressIndicator.



13
14
15
16
17
18
19
# File 'lib/archimate/progress_indicator.rb', line 13

def initialize(total: 100, title: "ArchiMate!")
  @progress = if Config.instance.interactive
                ProgressBar.create(total: total, title: title, throttle_rate: 0.5)
              else
                FakeProgressBar.new
              end
end

Instance Method Details

#finishObject



25
26
27
# File 'lib/archimate/progress_indicator.rb', line 25

def finish
  @progress.finish
end

#incrementObject



21
22
23
# File 'lib/archimate/progress_indicator.rb', line 21

def increment
  @progress.increment
end