Class: Suture::Adapter::ProgressBar
- Inherits:
-
Object
- Object
- Suture::Adapter::ProgressBar
- Defined in:
- lib/suture/adapter/progress_bar.rb
Instance Method Summary collapse
-
#initialize(attrs = {}) ⇒ ProgressBar
constructor
A new instance of ProgressBar.
- #progress(numerator, denominator) ⇒ Object
Constructor Details
#initialize(attrs = {}) ⇒ ProgressBar
Returns a new instance of ProgressBar.
5 6 7 |
# File 'lib/suture/adapter/progress_bar.rb', line 5 def initialize(attrs = {}) @options = {:length => 60}.merge(attrs) end |
Instance Method Details
#progress(numerator, denominator) ⇒ Object
9 10 11 |
# File 'lib/suture/adapter/progress_bar.rb', line 9 def progress(numerator, denominator) BarOfProgress.new(@options.merge(:total => denominator)).progress(numerator) end |