mirror of
https://github.com/edcommonwealth/sqm-dashboards.git
synced 2026-03-07 13:38:18 -08:00
Move array monkey patch into its own file
This commit is contained in:
parent
18ddfaaaf8
commit
457615505f
2 changed files with 7 additions and 6 deletions
|
|
@ -1,9 +1,3 @@
|
|||
class Array
|
||||
def average
|
||||
self.sum.to_f / self.size
|
||||
end
|
||||
end
|
||||
|
||||
class SurveyResponseAggregator
|
||||
def self.score(academic_year:, school:, measure:)
|
||||
SurveyItemResponse
|
||||
|
|
|
|||
7
config/initializers/array_monkey_patches.rb
Normal file
7
config/initializers/array_monkey_patches.rb
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
module ArrayMonkeyPatches
|
||||
def average
|
||||
self.sum.to_f / self.size
|
||||
end
|
||||
end
|
||||
|
||||
Array.include ArrayMonkeyPatches
|
||||
Loading…
Add table
Add a link
Reference in a new issue