class YearCommitStats

Public Class Methods

new() click to toggle source
# File lib/gitstats/stats/commit/time.rb, line 4
def initialize
  @hash = Hash.new
end

Public Instance Methods

update(commit) click to toggle source
# File lib/gitstats/stats/commit/time.rb, line 8
def update(commit)
  year = commit[:time].year
  @hash[year] ||= AuthorsCommitStats.new
  @hash[year].update(commit)
end