Today we look at the humble String#gsub method, and learn that it has some surprising tricks up its sleeve.
Month: March 2014
Episode #189: Assisted Refactoring
In today's episode, we'll examine how the availability of tools to aid refactoring can change how we write code.
Episode #188: Fail And Raise
Today's episode is about a semantic convention for error handling that I learned from Jim Weirich.
Episode #187: More Keyword Arguments
Today we go a little deeper into keyword arguments in Ruby 2.0/2.1, covering a few use cases we didn't cover in the last episode.
Episode #186: Keyword Arguments
Today's episode is a guide to transitioning various hash argument idioms to Ruby 2.0/2.1 keywords.
Episode #185: Two Refactorings
Today's dish is a refactoring approached from two different perspectives. Enjoy!
Episode #184: Sequel, Postgres, JSON
Recently we looked at the Sequel library for interacting with SQL databases. Today, we'll use Sequel again to play with the native JSON support in PostgreSQL 9.3.
Episode #183: Extracting Ghost Load
We've used the "ghost object" pattern to lazily load attributes of a model object. And we've made a macro to easily declare "ghost-loadable" attribute accessors. Today we complete the generalization …