Sunday, August 31, 2014

Ruby Date & DateTime class extension

My recent user story demanded me to extend Date and  DateTime classes to support few more methods.

Following is the code and this is done using Ruby's Dynamic Proxy Technique.

Copy above date.rb file and keep it under initializer directory of your Rails application.

No comments: