Sha256: cb362a13a451d6aed1850db06a40ffa687e845ec25304296a5f8b9108818f74f

Contents?: true

Size: 155 Bytes

Versions: 5

Compression:

Stored size: 155 Bytes

Contents

class NilHash < Hash

  def method_missing(name, *args, &block)
    super
  rescue NoMethodError
    if 0 == args.size
      self[name]
    end
  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rmpd-1.1.16 lib/rmpd/nil_hash.rb
rmpd-1.1.15 lib/rmpd/nil_hash.rb
rmpd-1.1.13 lib/rmpd/nil_hash.rb
rmpd-1.1.12 lib/rmpd/nil_hash.rb
rmpd-1.1.11 lib/rmpd/nil_hash.rb