__getattr__(self,
method_name)
(Qualification operator)
This routine is called by default when a requested attribute (or
method) is accessed that has no definition. Unfortunately __getattr__
only passes the requested method name and not the arguments. So we
extend the functionality with a little lambda magic to the routine
method_missing(). Which is actually how Ruby handles missing methods by
default ... with arguments. Now we are just as cool as Ruby.
-
- Parameters:
method_name -
The name of the requested and undefined attribute (or method
in our case).
(type=String)
- Returns:
-
Lambda magic passing control (and in turn the arguments we
want) to self.method_missing().
(type=Lambda)
|