Module: RForce::MethodKeys

Included in:
MethodHash, SoapResponseExpat, SoapResponseRexml
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


10
11
12
13
# File 'lib/rforce/method_keys.rb', line 10

def method_missing(method, *args)
  return self[method] if respond_to?(:[])
  super
end

Instance Method Details

#respond_to_missing?Boolean

Returns:

  • (Boolean)

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

def respond_to_missing?(*)
  return true if respond_to?(:[])
  super
end