Aquarium has a framework that implements Aspect-Oriented Programming (AOP) for Ruby. Perhaps this could prove to be helpful towards achieving your particular programming technique.
Thanks for your reply, I will look at the Aquarium, but I am not sure Rhodes platform will support all the ruby features,
Jon pointed out that we can not use dynamic ruby features in Rhodes, is that true?
Rhodes uses YARV (Ruby 1.9 VM) for most implementations. The Ruby is compiled to bytecode. The VM runs the bytecode. The Rhodes runtime includes the VM and parts of the standard Ruby library. It omits the parts that are able to compile Ruby code to bytecode. If they did include these parrts, then Apple would not accept Rhodes apps in the App Store.
The code that compiles Ruby to bytecode isn't actually in Ruby, it's in C, so there might be some considerable effort needed to port to all of the platforms, as well.
Presumably, this also has impact of the size of the executable, but I don't know how significant that is. If this functionality were restored on those platforms where it is allowed, I dunno how much this would add to executable size, so don't know if this was a major consideration in the design, or if it was predicated only on Apple's restriction.
Steve: I think you are over-reaching Rhodes' capabilities. This is all nice, but not practical.