Class: ConsoleProgressBar::ProgressBar

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

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.animator(options = {}) ⇒ Object



16
17
18
# File 'lib/console_progress_bar.rb', line 16

def self.animator(options = {})
  new.animator(options)
end

.bar(options = {}) ⇒ Object



20
21
22
# File 'lib/console_progress_bar.rb', line 20

def self.bar(options = {})
  new.bar(options)
end

.counter(options = {}) ⇒ Object



12
13
14
# File 'lib/console_progress_bar.rb', line 12

def self.counter(options = {})
  new.counter(options)
end

Instance Method Details

#animator(options = {}) ⇒ Object



29
30
31
32
# File 'lib/console_progress_bar.rb', line 29

def animator(options = {})
	init_options(options)
	ConsoleProgressBar::Animator.new(@total, @with_elapsed_time, @with_remaining_time, @increment_size)
end

#bar(options = {}) ⇒ Object



34
35
36
37
# File 'lib/console_progress_bar.rb', line 34

def bar(options = {})
	init_options(options)
	ConsoleProgressBar::Bar.new(@total, @with_elapsed_time, @with_remaining_time, @increment_size, @width)
end

#counter(options = {}) ⇒ Object



24
25
26
27
# File 'lib/console_progress_bar.rb', line 24

def counter(options = {})
	init_options(options)
	ConsoleProgressBar::Counter.new(@total, @with_elapsed_time, @with_remaining_time, @increment_size)
end