Libraries
»
iota-ruby
(1.1.9)
»
Index (A)
»
Array
Class: Array
Inherits:
Object
Object
Array
show all
Defined in:
lib/patch.rb
Instance Method Summary
collapse
#
sum
⇒ Object
Instance Method Details
#
sum
⇒
Object
4 5 6
# File 'lib/patch.rb', line 4
def
sum
inject
(
0
)
{
|
sum
,
val
|
sum
+
val
}
end