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.1.3 hack_night/solution/math_service.rb
asir-1.1.2 hack_night/solution/math_service.rb
asir-1.1.1 hack_night/solution/math_service.rb
asir-1.1.0 hack_night/solution/math_service.rb
asir-1.0.8 hack_night/solution/math_service.rb
asir-1.0.7 hack_night/solution/math_service.rb
asir-1.0.6 hack_night/solution/math_service.rb
asir-1.0.5 hack_night/solution/math_service.rb
asir-1.0.4 hack_night/solution/math_service.rb
asir-1.0.1 hack_night/solution/math_service.rb
asir-0.2.0 hack_night/solution/math_service.rb