Class: Array

Inherits:
Object
  • Object
show all
Defined in:
lib/patch.rb

Instance Method Summary collapse

Instance Method Details

#sumObject



4
5
6
# File 'lib/patch.rb', line 4

def sum
  inject(0) {|sum, val| sum + val}
end