Class: MonthCommitStats
- Inherits:
-
Object
- Object
- MonthCommitStats
- Includes:
- StatsHash
- Defined in:
- lib/gitstats/stats/commit/time.rb
Instance Method Summary collapse
-
#initialize ⇒ MonthCommitStats
constructor
A new instance of MonthCommitStats.
- #update(commit) ⇒ Object
Methods included from StatsHash
Constructor Details
#initialize ⇒ MonthCommitStats
Returns a new instance of MonthCommitStats.
18 19 20 |
# File 'lib/gitstats/stats/commit/time.rb', line 18 def initialize @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
22 23 24 25 26 |
# File 'lib/gitstats/stats/commit/time.rb', line 22 def update(commit) month = commit[:time].month @hash[month] ||= AuthorsCommitStats.new @hash[month].update(commit) end |