Sometimes one instance is all you need.
Category: Season 1
Episode #012: #fetch for Defaults
How to use Hash#fetch to provide defaults for missing keys, and why you might prefer that to other techniques for defaulting values.
Episode #011: Method and Message
A look at the difference between methods and messages, and why passing methods around isn't as common in Ruby as it is in e.g. JavaScript.
Episode #008: #fetch as an Assertion
Hash#fetch is one of my favorite methods. In this episode, I take a look at using it to assert the existence of hash keys.
Episode #007: Constructors
A look into how Ruby's object construction works, and how we can customize constructors for special scenarios.
Episode #005: Array Literals
Using strings to build up command lines for execution is error-prone and potentially insecure. Check out why Ruby's %W array-literal syntax is the perfect tool for writing, composing, and executing …