Sha256: 74fee01ed2c46e55c726cb9132cf7eaf780673934f3cdf60a692cd422d3d0f06

Contents?: true

Size: 269 Bytes

Versions: 10

Compression:

Stored size: 269 Bytes

Contents

class Hash

  # Like merge operator '+' but merges in reverse order.
  #
  #   h1 = {:a=>1}
  #   h2 = {:a=>2, :b=>3}
  #
  #   (h1 + h2) #=> { :a=>2, :b=>3 }
  #   (h1 * h2)  #=> { :a=>1, :b=>3 }
  #
  # CREDIT: Trans

  def *(other)
    other.merge(self)
  end

end

Version data entries

10 entries across 9 versions & 2 rubygems

Version Path
facets-glimmer-3.2.0 lib/core/facets/hash/op_mul.rb
facets-3.1.0 lib/core/facets/hash/op_mul.rb
facets-3.0.0 lib/core/facets/hash/op_mul.rb
facets-2.9.3 lib/core/facets/hash/op_mul.rb
facets-2.9.2 lib/core/facets/hash/op_mul.rb
facets-2.9.2 src/core/facets/hash/op_mul.rb
facets-2.9.1 lib/core/facets/hash/op_mul.rb
facets-2.9.0 lib/core/facets/hash/op_mul.rb
facets-2.9.0.pre.2 lib/core/facets/hash/op_mul.rb
facets-2.9.0.pre.1 lib/core/facets/hash/op_mul.rb