Next: methods

Prev: get_var

list_method

list_method(name)
list_method(name, indentation)
list_method(name, indentation, parenthesization)
This function returns a list of strings containing a decompiled version of the method named by the symbol name. If the method name is not defined on the current object, then list_method() results in a ~methodnf error. Note that name must be defined on the current object, not on its ancestors.

The decompiled code may not look exactly like the code that was compiled to produce the method. The only guarantee is that it will compile to a method with the same behavior.

If you specify the integer indentation, then the decompiler will use that number of spaces for indenting. The default is 4 spaces. If you specify the integer parenthesization and it is non-zero, then the decompiler will put parentheses around every subexpression. Otherwise, the compiler will only use parentheses when needed.