Sha256: 48313d8516b59a9b028271836ce2902af50f15faa8e29ac3c440aeede73b997e

Contents?: true

Size: 180 Bytes

Versions: 15

Compression:

Stored size: 180 Bytes

Contents

class Array
  def sum
    inject(0, :+)
  end

  # For some reason .to_h doesn't show as defined in opal, but defined?(:to_h)
  # returns true.
  def to_h
    Hash[self]
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
volt-0.9.5.pre4 lib/volt/extra_core/array.rb
volt-0.9.5.pre3 lib/volt/extra_core/array.rb
volt-0.9.5.pre2 lib/volt/extra_core/array.rb
volt-0.9.5.pre1 lib/volt/extra_core/array.rb
volt-0.9.4 lib/volt/extra_core/array.rb
volt-0.9.4.pre5 lib/volt/extra_core/array.rb
volt-0.9.4.pre3 lib/volt/extra_core/array.rb
volt-0.9.4.pre2 lib/volt/extra_core/array.rb
volt-0.9.4.pre1 lib/volt/extra_core/array.rb
volt-0.9.3 lib/volt/extra_core/array.rb
volt-0.9.3.pre6 lib/volt/extra_core/array.rb
volt-0.9.3.pre5 lib/volt/extra_core/array.rb
volt-0.9.3.pre4 lib/volt/extra_core/array.rb
volt-0.9.3.pre3 lib/volt/extra_core/array.rb
volt-0.9.3.pre2 lib/volt/extra_core/array.rb