File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -6,8 +6,9 @@ def initialize(period)
6
6
def annual_sum_total_of_aggregatable_dojo
7
7
return @annual_sum_total_of_aggregatable_dojo if defined? ( @annual_sum_total_of_aggregatable_dojo )
8
8
9
- hash = Dojo . aggregatable_annual_count ( @period )
10
- @annual_sum_total_of_aggregatable_dojo = year_hash_template . merge! ( hash ) . each . with_object ( { } ) { |( k , v ) , h | h [ k ] = ( h . values . last || 0 ) + v }
9
+ @annual_sum_total_of_aggregatable_dojo = year_hash_template . merge! ( dojo_annual_count ) . each . with_object ( { } ) do |( k , v ) , h |
10
+ h [ k ] = ( h . values . last || 0 ) + v
11
+ end
11
12
end
12
13
13
14
def annual_count_of_event_histories
@@ -25,7 +26,7 @@ def annual_sum_of_participants
25
26
end
26
27
27
28
def annual_dojos_chart
28
- HighChartsBuilder . build_annual_dojos ( Dojo . annual_count ( @period ) )
29
+ HighChartsBuilder . build_annual_dojos ( dojo_annual_count )
29
30
end
30
31
31
32
def annual_event_histories_chart
@@ -38,6 +39,10 @@ def annual_participants_chart
38
39
39
40
private
40
41
42
+ def dojo_annual_count
43
+ Dojo . annual_count ( @period )
44
+ end
45
+
41
46
def year_hash_template
42
47
initialized_year_hash . dup
43
48
end
You can’t perform that action at this time.
0 commit comments