Method: Console::Progress#initialize

Defined in:
lib/console/progress.rb

#initialize(subject, total = 0, minimum_output_duration: 0.1, **options) ⇒ Progress

Create a new progress indicator.



23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/console/progress.rb', line 23

def initialize(subject, total = 0, minimum_output_duration: 0.1, **options)
	@subject = subject
	@options = options
	
	@start_time = Clock.now
	
	@last_output_time = nil
	@minimum_output_duration = minimum_output_duration
	
	@current = 0
	@total = total
end