Class: CommitStats
Instance Attribute Summary
#commits, #files_added, #files_deleted, #first_commit, #last_commit, #lines_added, #lines_deleted
Instance Method Summary
collapse
#files, #lines
Constructor Details
Returns a new instance of CommitStats.
44
45
46
47
|
# File 'lib/gitstats/stats/commit.rb', line 44
def initialize
super
@days = {}
end
|
Instance Method Details
#days ⇒ Object
49
50
51
|
# File 'lib/gitstats/stats/commit.rb', line 49
def days
@days.size
end
|
#daystats ⇒ Object
53
54
55
|
# File 'lib/gitstats/stats/commit.rb', line 53
def daystats
@days
end
|
#update(commit) ⇒ Object
57
58
59
60
61
62
|
# File 'lib/gitstats/stats/commit.rb', line 57
def update(commit)
super(commit)
day = commit[:time].to_date
@days[day] ||= CommitAccumulator.new
@days[day].update(commit)
end
|