Class: Archimate::ProgressIndicator
- Inherits:
-
Object
- Object
- Archimate::ProgressIndicator
- Defined in:
- lib/archimate/progress_indicator.rb
Defined Under Namespace
Classes: FakeProgressBar
Instance Method Summary collapse
- #finish ⇒ Object
- #increment ⇒ Object
-
#initialize(total: 100, title: "ArchiMate!") ⇒ ProgressIndicator
constructor
A new instance of ProgressIndicator.
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
#finish ⇒ Object
25 26 27 |
# File 'lib/archimate/progress_indicator.rb', line 25 def finish @progress.finish end |
#increment ⇒ Object
21 22 23 |
# File 'lib/archimate/progress_indicator.rb', line 21 def increment @progress.increment end |