Module: RForce::MethodKeys

Included in:
MethodHash
Defined in:
lib/rforce/method_keys.rb

Overview

Allows indexing hashes like method calls: hash.key to supplement the traditional way of indexing: hash

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args) ⇒ Object

Raises:

  • (NoMethodError)


5
6
7
8
# File 'lib/rforce/method_keys.rb', line 5

def method_missing(method, *args)
  raise NoMethodError unless respond_to?('[]')
  self[method]
end