Sha256: 2a99809de3399b985ebe118801cf75396f5a0ca23352446cece60ecbbb9388ff

Contents?: true

Size: 347 Bytes

Versions: 31

Compression:

Stored size: 347 Bytes

Contents

# 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.

require 'math_service'

######################################################################

begin
  puts MathService.sum([1, 2, 3]) # => 6
end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
asir-1.1.3 hack_night/solution/prob-1.rb
asir-1.1.2 hack_night/solution/prob-1.rb
asir-1.1.1 hack_night/solution/prob-1.rb
asir-1.1.0 hack_night/solution/prob-1.rb
asir-1.0.8 hack_night/solution/prob-1.rb
asir-1.0.7 hack_night/solution/prob-1.rb
asir-1.0.6 hack_night/solution/prob-1.rb
asir-1.0.5 hack_night/solution/prob-1.rb
asir-1.0.4 hack_night/solution/prob-1.rb
asir-1.0.1 hack_night/solution/prob-1.rb
asir-0.2.0 hack_night/solution/prob-1.rb