News for hackers. Stuff that matters.
Re:Do you know Ruby’s ‘Chainsaw’ method? by jfmiller28 on Thursday October 07, 2010 @12:46AM (#1766869)
The most sited example is ActiveRecord where finders can be auto-generated. For example `find_by_name_and_address` will be defined on the fly the first time it is used in code. Another common usage is a wrapper class that provides a unified interface to a set of underlying objects. If many of these objects have almost the same interface `def method_missing(method,args); @object.send(method, args);end` can save a lot of redundant definitions.

There are no comments on this comment yet.