Class: Suture::Adapter::ProgressBar

Inherits:
Object
  • Object
show all
Defined in:
lib/suture/adapter/progress_bar.rb

Instance Method Summary collapse

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