Hi, I have been given an exercise to write code for rails like before_filter and after_filter in pure Ruby. And not surprisingly I don't know how to do that. Please..
I don't want to do your homework for you... but your pure Ruby class could inherit from a base class that has "before_filter" and "after_filter" methods, and then does some stuff on initialize and after initialize...
Also worth looking at the source code for Rails and seeing how it's done there - and looking up in your textbooks or the API anything you don't understand.
Use the source, Luke.