class Derrick::Progress
Attributes
collected[R]
fetched[R]
total[R]
Public Class Methods
new(total)
click to toggle source
# File lib/derrick/progress.rb, line 5 def initialize(total) @total = total @mutex = Mutex.new @collected = 0 @fetched = 0 end
Public Instance Methods
increment_collected(count)
click to toggle source
# File lib/derrick/progress.rb, line 13 def increment_collected(count) @mutex.synchronize { @collected += count } end
increment_fetched(count)
click to toggle source
# File lib/derrick/progress.rb, line 17 def increment_fetched(count) @mutex.synchronize { @fetched += count } end