Ok, thanks for all the great feedback.

here is how it turned out:

<pre>
Aop.define_aspect do
	self_register

	match_by_signature "Some*" 	#matches by class names
	match_by_class String 		#matches by a specific Class

	pointcut_by_signature "some_method", "some_prop="
	with LoggingInterceptor.new

	pointcut_by_signature "length"
	with LoggingInterceptor.new, TestInterceptor.new

	#mixins that will be "include"'ed to the types matched by the aspect
	mixin MyMixin, MyOtherMixin
end
</pre>

I cant say anything else than Im starting to fall in love with ruby.
the implementation of blocks is just too bloody slick in ruby.

with this I can get a totally declarative approach to defining aspects.
and the dsl can easily be extended by just adding methods to my Aspect 
class.

any comments, does it look somewhat ok?
Ive only been playing with ruby for about a week now so I dont quite 
know when Im abusing the language or not.

//Roger

-- 
Posted via http://www.ruby-forum.com/.