[Kde-bindings] const_missing method in ruby 1.8

Germain Garand germain at ebooksfrance.org
Tue Aug 5 23:03:46 UTC 2003


Le Mardi 05 Août 2003 23:42, Germain Garand a écrit :
> When a method isn't found, instead of dying immediately, I made it simply
> lookup again, reducing the name at each iteration, then dump all the
> matches
>
> method "foobar"-> look for "fooba", "foob", "foo"
>                              and "oobar", "obar", "bar"
>

mmh sorry, that's not right.
 I first ask smoke for all the methods of the current class (+inherited), 
_then_ I perform a regular expression search in the answers with the 
gradually decaying patterns above.

See Qt.xs: findAllMethods() / getAllParents()




More information about the Kde-bindings mailing list