Sha256: 76551785fda96840b58ee741e5c2efc85b45eab498d93d3d4ae9c59ca7396092

Contents?: true

Size: 190 Bytes

Versions: 1

Compression:

Stored size: 190 Bytes

Contents

module HashEasy
  class BottomlessHash < Hash
    def initialize
      super &-> h, k { h[k] = self.class.new }
    end

    def self.from_hash(hash)
      new.merge(hash)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
hash_easy-0.0.3 lib/hash_easy/bottomless_hash.rb