Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
10 lines (8 sloc) 215 Bytes
# Sample highlightable code with keywords,
# operators, strings, numbers, etc.
module MyMath
def self.sum_array(arr)
arr.reduce(0) { |acc, x| x + acc }
end
end
puts "Sum is: #{MyMath.sum_array([1, 2, 3])}"
You can’t perform that action at this time.