| |
| Recipe 3.9: Modifying the Signature of an Attribute or Method at Runtime |
Last Updated: Sep 8, 2003
Status: Draft
|
|
|
|
How important is this problem to you?
(Login to Vote)
0.00 Rating, 0 Votes
|
|
How acceptable is the proposed solution?
(Login to Vote)
0.00 Rating, 0 Votes
|
|
Problem:
You want to modify the signature of a method at runtime; for example, you want to alter the expected arguments of a method.
Solution:
Replace the definition of the method, using an anonymous method with the signature you want:
MyClass.bar = method (... args ...) { ... }; # with signature
|
|