Method: Object#method_missing
- Defined in:
- lib/fOOrth/core/object.rb
#method_missing(symbol, *args, &block) ⇒ Object
The method_missing hook is used to provide meaningful error messages when problems are encountered.
Parameters:
-
symbol - The symbol of the missing method.
-
args - Any arguments that were passed to that method.
-
block - Any block that might have passed to the method.
Note:
-
Since stubs for Object class do not create methods, an attempt is made
to execute the stub if the symbol maps and is in the Object class. This
ensures that the case specific stub code is used rather than the generic
code in this method.
66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/fOOrth/core/object.rb', line 66 def method_missing(symbol, *args, &block) if (name = XfOOrth::SymbolMap.unmap(symbol)) if (stub_spec = Object.foorth_shared[symbol]) self.instance_exec(*args, &stub_spec.does) else f20_error(self, name, symbol) end else super end end |