Class: Array

Inherits:
Object
  • Object
show all
Defined in:
lib/measures/GLHEProExportLoadsforGroundHeatExchangerSizing/measure.rb

Overview

Patch an array sum method into Ruby187

Instance Method Summary collapse

Instance Method Details

#sumObject



12
13
14
# File 'lib/measures/GLHEProExportLoadsforGroundHeatExchangerSizing/measure.rb', line 12

def sum
  inject { |sum, x| sum + x }
end