From: Daniel Nugent Date: 2006-02-08T23:18:03+09:00 Subject: Re: Meta-Meta-Programming So, just for clarifications sake: Both the presented wrapping method and the cut library used earlier are implementations (generic uses?) of Aspect Oriented Programming, right? Nothing *more* than that going on, correct? Vidar, I think the question there is: Should I rely on a type/method check to ensure that I don't get bad parameters or should I just write some tests to make sure that the code in question fails in a sensible way when those expectations aren't met. Those would be edge cases after all, and you'd have to write the tests for them anyway. To me, it seems to be unDRY... Except if you were using it to enhance performance through typing related optimizations. On 2/8/06, Erik Veenstra wrote: > Did I mention that it is possible to double-wrap a method with > two or more monitor-functions? The order in which they are > executed is down-up: > > class Foo > def bar(x, y, z) > # x should be Numeric > # y should be a String > # z should respond to :to_s and :gsub > end > typed :bar, Numeric, String, [:to_s, :gsub] > log_args :bar > end > > gegroet, > Erik V. - http://www.erikveen.dds.nl/ > > > -- -Dan Nugent