Sha256: 267ece5a608f7149d0379ee1de7d01f4d62e0710cb5d081d41b1c6086e31ee88

Contents?: true

Size: 309 Bytes

Versions: 1

Compression:

Stored size: 309 Bytes

Contents

class Hash

  # Associates a key-value a la +Hash#[]=+, but returns the modified
  # Hash instead of the value.  Useful with +#reduce+, and faster than
  # +Hash#merge!+.
  #
  # @param key
  # @param value
  # @return [Hash] the modified hash
  def put!(key, value)
    self[key] = value
    self
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
casual_support-2.0.0 lib/casual_support/hash/putbang.rb