Class: DayOfWeekCommitStats
- Inherits:
-
Object
- Object
- DayOfWeekCommitStats
- Includes:
- StatsHash
- Defined in:
- lib/gitstats/stats/commit/time.rb
Instance Method Summary collapse
-
#initialize ⇒ DayOfWeekCommitStats
constructor
A new instance of DayOfWeekCommitStats.
- #update(commit) ⇒ Object
Methods included from StatsHash
Constructor Details
#initialize ⇒ DayOfWeekCommitStats
Returns a new instance of DayOfWeekCommitStats.
78 79 80 |
# File 'lib/gitstats/stats/commit/time.rb', line 78 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
82 83 84 85 86 |
# File 'lib/gitstats/stats/commit/time.rb', line 82 def update(commit) day = commit[:time].wday @hash[day] ||= HourCommitStats.new @hash[day].update(commit) end |