Sha256: bbb137d0db6fe9647f885f28701c5800545360552af99692433505a229bfa9ce

Contents?: true

Size: 244 Bytes

Versions: 17

Compression:

Stored size: 244 Bytes

Contents

class Hash

  # Can be used like update, or passed
  # as two-element [key,value] array.
  #
  # CREDIT: Trans

  def <<(other)
    if other.respond_to?(:to_ary)
      self.store(*other)
    else
      update(other)
    end
    self
  end

end

Version data entries

17 entries across 16 versions & 1 rubygems

Version Path
facets-2.9.3 lib/core/facets/hash/op_push.rb
facets-2.9.2 src/core/facets/hash/op_push.rb
facets-2.9.2 lib/core/facets/hash/op_push.rb
facets-2.9.1 lib/core/facets/hash/op_push.rb
facets-2.9.0 lib/core/facets/hash/op_push.rb
facets-2.9.0.pre.2 lib/core/facets/hash/op_push.rb
facets-2.9.0.pre.1 lib/core/facets/hash/op_push.rb
facets-2.8.4 lib/core/facets/hash/op_push.rb
facets-2.8.3 lib/core/facets/hash/op_push.rb
facets-2.8.2 lib/core/facets/hash/op_push.rb
facets-2.8.1 lib/core/facets/hash/op_push.rb
facets-2.8.0 lib/core/facets/hash/op_push.rb
facets-2.7.0 lib/core/facets/hash/op_push.rb
facets-2.6.0 lib/core/facets/hash/op_push.rb
facets-2.5.0 lib/core/facets/hash/op_push.rb
facets-2.5.1 lib/core/facets/hash/op_push.rb
facets-2.5.2 lib/core/facets/hash/op_push.rb