Class: AuthorsCommitStats
- Inherits:
-
CommitStats
- Object
- CommitAccumulator
- CommitStats
- AuthorsCommitStats
- Includes:
- StatsHash
- Defined in:
- lib/gitstats/stats/commit/author.rb
Instance Attribute Summary
Attributes inherited from CommitAccumulator
#commits, #files_added, #files_deleted, #first_commit, #last_commit, #lines_added, #lines_deleted
Instance Method Summary collapse
-
#initialize ⇒ AuthorsCommitStats
constructor
A new instance of AuthorsCommitStats.
- #update(commit) ⇒ Object
Methods included from StatsHash
Methods inherited from CommitStats
Methods inherited from CommitAccumulator
Constructor Details
#initialize ⇒ AuthorsCommitStats
Returns a new instance of AuthorsCommitStats.
4 5 6 7 |
# File 'lib/gitstats/stats/commit/author.rb', line 4 def initialize super @hash = Hash.new end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class StatsHash
Instance Method Details
#update(commit) ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/gitstats/stats/commit/author.rb', line 9 def update(commit) super(commit) = commit[:author] @hash[] ||= CommitStats.new @hash[].update(commit) end |