Sha256: 599c35729b18a4240cd35043c92edf0d12bda7e7134621081a8cb4a78584526a

Contents?: true

Size: 232 Bytes

Versions: 31

Compression:

Stored size: 232 Bytes

Contents

module MathService
  def sum array_of_numbers
    raise TypeError unless Array === array_of_numbers
    array_of_numbers.inject(0) do | s, e |
      raise TypeError unless Numeric === e
      s += e
    end
  end
  extend self
end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
asir-1.2.11 hack_night/solution/math_service.rb
asir-1.2.10 hack_night/solution/math_service.rb
asir-1.2.9 hack_night/solution/math_service.rb
asir-1.2.8 hack_night/solution/math_service.rb
asir-1.2.7 hack_night/solution/math_service.rb
asir-1.2.6 hack_night/solution/math_service.rb
asir-1.2.5 hack_night/solution/math_service.rb
asir-1.2.3 hack_night/solution/math_service.rb
asir-1.2.2 hack_night/solution/math_service.rb
asir-1.2.1 hack_night/solution/math_service.rb
asir-1.2.0 hack_night/solution/math_service.rb
asir-1.1.12 hack_night/solution/math_service.rb
asir-1.1.11 hack_night/solution/math_service.rb
asir-1.1.10 hack_night/solution/math_service.rb
asir-1.1.9 hack_night/solution/math_service.rb
asir-1.1.8 hack_night/solution/math_service.rb
asir-1.1.7 hack_night/solution/math_service.rb
asir-1.1.6 hack_night/solution/math_service.rb
asir-1.1.5 hack_night/solution/math_service.rb
asir-1.1.4 hack_night/solution/math_service.rb