Re: Rails 2.2.2 to_date and to_datetime methods

Robert Walker
Wed, 04 Feb 2009 21:05:07 -0000

By the way it is possible to add methods to instances of objects in
Ruby. Although that is not what''s being done in your case. Rails is
simply extending the Ruby String class to add the method to all
instances of String.

Here is a nice blog about singleton methods in case you want to know