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.2.11 hack_night/solution/prob-1.rb
asir-1.2.10 hack_night/solution/prob-1.rb
asir-1.2.9 hack_night/solution/prob-1.rb
asir-1.2.8 hack_night/solution/prob-1.rb
asir-1.2.7 hack_night/solution/prob-1.rb
asir-1.2.6 hack_night/solution/prob-1.rb
asir-1.2.5 hack_night/solution/prob-1.rb
asir-1.2.3 hack_night/solution/prob-1.rb
asir-1.2.2 hack_night/solution/prob-1.rb
asir-1.2.1 hack_night/solution/prob-1.rb
asir-1.2.0 hack_night/solution/prob-1.rb
asir-1.1.12 hack_night/solution/prob-1.rb
asir-1.1.11 hack_night/solution/prob-1.rb
asir-1.1.10 hack_night/solution/prob-1.rb
asir-1.1.9 hack_night/solution/prob-1.rb
asir-1.1.8 hack_night/solution/prob-1.rb
asir-1.1.7 hack_night/solution/prob-1.rb
asir-1.1.6 hack_night/solution/prob-1.rb
asir-1.1.5 hack_night/solution/prob-1.rb
asir-1.1.4 hack_night/solution/prob-1.rb