Section 7. Domain-Specific Languages

After cruising through the back roads of Ruby, it is time to get back on the main highway and head back into the heartland of Rails again. It is time to look at the one other aspect of Rails’s success: how Rails writes complicated code using only simple declarations. Let’s examine our final Rubyism of this digital shortcut: domain-specific languages.

I have thus far neglected to touch upon one other important aspect of highways: signage. That would be a serious oversight, because highway signs are one of the most effectively designed examples of communication on the planet. They provide necessary and unambiguous information to motorists who have only seconds to read them. Consequently, they succeed only through ...

Get Rubyisms in Rails now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.