Is there a way to decorate a function in Ruby as it’s done in Python? That is, have something execute at the beginning (and end?) of each function.
Like this: http://programmingbits.pythonblogs.com/27_programmingbits/archive/50_function_decorators.html
If by function you mean closure, you could use a block: