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.
Category: Episodes
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 …
Episode #004: Barewords
In this longer-than-usual episode, some thoughts on how to enable method logic to remain stable and unchanged while evolving and changing the source and scope of the values used by …
Episode #003: Character Literals
Much like a vestigial tail, Ruby has a character literal syntax which is funny-looking and largely useless. In the interests of completeness, let's see if we can find an excuse …
Episode #001: Binary Literals
In this inaugural episode, a look at a handy syntax for writing out binary numbers.