Sha256: 28e2732df923f431a243b85f3fa55373c06d8dbe073ee4fc63b8b04f51fb0a7a
Contents?: true
Size: 416 Bytes
Versions: 31
Compression:
Stored size: 416 Bytes
Contents
# prob-1.rb # Write a MathService module that has a method that can sum an Array of Numbers # It should raise an exception if not given an Array. # It should raise an exception if any elements are not Numeric. module MathService def sum array_of_numbers # ??? end extend self end ###################################################################### begin puts MathService.sum([1, 2, 3]) # => 6 end
Version data entries
31 entries across 31 versions & 1 rubygems