Class: GitMiner::Progress

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

Constant Summary collapse

HISTORIC_SIZE =
10

Instance Method Summary collapse

Constructor Details

#initialize(prefix_length) ⇒ Progress

Returns a new instance of Progress.



5
6
7
8
9
# File 'lib/git_miner/progress.rb', line 5

def initialize(prefix_length)
  @combinations = 16 ** prefix_length

  @historic = []
end

Instance Method Details

#tick(batch, count) ⇒ Object



11
12
13
14
# File 'lib/git_miner/progress.rb', line 11

def tick(batch, count)
  update_historic(batch, count)
  report(count)
end