Sha256: 2711e952fec6f5c5f2073c6178d40edda931afbbead1dc4175527b045768ed60
Contents?: true
Size: 221 Bytes
Versions: 10
Compression:
Stored size: 221 Bytes
Contents
class Hash # Instantiate a new hash with a default # value determined by the block. # # Hash.new_with{ [] } # # CREDIT: Pit Capitan def self.new_with #:yield: new { |h, k| h[k] = yield } end end
Version data entries
10 entries across 9 versions & 2 rubygems