Class: Hash

Inherits:
Object
  • Object
show all
Defined in:
lib/AWS.rb

Overview

A custom implementation of Hash that allows us to access hash values using dot notation

Examples:

Access the hash keys in the standard way or using dot notation

foo[:bar] => "baz"
foo.bar => "baz"

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

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



26
27
28
29
30
# File 'lib/AWS.rb', line 26

def method_missing(meth, *args, &block)
  if args.size == 0
    self[meth.to_s] || self[meth.to_sym]
  end
end