Class: Array

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

Instance Method Summary collapse

Instance Method Details

#sum_it(attribute) ⇒ Object



42
43
44
# File 'lib/conductor.rb', line 42

def sum_it(attribute)
  self.map {|x| x.send(attribute) }.compact.sum
end