Ruby's Metaprogramming Toolbox
What is Metaprogramming?
Metaprogramming is the writing of computer programs that write or manipulate other programs (or themselves) as their data, or that do part of the work at compile time that would otherwise be done at runtime. In many cases, this allows programmers to get more done in the same amount of time as they would take to write all the code manually, or it gives programs greater flexibility to efficiently handle new situations without recompilation. (via Wikipedia)
The following tutorial lists all the methods from the Ruby core that are useful for metaprogramming as well as demonstrates common usage scenarios you will find helpful to get started. In conclution, an example is presented showing how to develop a dynamic database class like ActiveRecord which automatically generates classes for database tables and populates each model class with getters and setters for its fields.
Ruby
- Aug 25 2009 Ruby's Metaprogramming Toolbox
- Aug 14 2009 Twitter Authentication Rails Plugin added to Github
- Aug 14 2009 RComposite added to Github
- Feb 26 2007 Breaking into Orkut with Mechanize
- Feb 14 2007 Scraping Gmail with Mechanize and Hpricot
- Dec 06 2006 Multiple Concurrent Database Connections with ActiveRecord
- Nov 17 2006 250 RadRails Templates
- Nov 15 2006 Installing Rails and Mongrel on a Shared Host
- Oct 23 2006 Using RMagick with Flickr
- Oct 18 2006 Render Great-looking Collages with Ruby and RMagick
- Jul 30 2006 Mongrel 0.3.13.4 Pre-Release
- Aug 09 2005 Using ActiveRecord for Simple Maintenance Scripting
