Product Site

5.1.3.1. new (Class Method)

Returns a new instance of the Method class, which is an executable representation of the code contained in the source. The name is a string. The source can be a single string or an array of strings containing individual method lines.

The context allows the created method to inherit class and routine lookup scope from another source. If specified, context can be a Method object, a Routine object, a Package object, or the string "PROGRAMSCOPE". PROGRAMSCOPE is the default, and specifies that the newly created method will inherit the class and routine search scope from the caller of the new method.