Class: NilHash

Inherits:
Hash
  • Object
show all
Defined in:
lib/rmpd/nil_hash.rb

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, *args, &block) ⇒ Object



3
4
5
6
7
8
9
# File 'lib/rmpd/nil_hash.rb', line 3

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