Rails 3 modularity

I was reading through ActionDispatch::Routing::Mapper to understand how the routing DSL was implemented and ended up learning a really nice technique for modularizing a class. Here is the gist of it:

Probably not something you want to do all the time. For framework code, where you want to provide building blocks that people can pull out bits and pieces of functionality, or swap out pieces with their own, this is pretty much how rails 3 does it.

Ben Marini

  • software craftsman
  • san francisco, ca

Rails respond_to gotcha
06 Sep 2011
Rails 3 modularity
30 Dec 2010
Rails 3 routing DSL implementation
29 Dec 2010
A DSL implementation based on Bundler
28 Dec 2010
The case for case statements
18 Apr 2009