Guides to the core and standard libraries, as well as selected Rubygems.
In part 2 of this series, we buy ourselves some peace of mind with a simple smoke test. The code for this episode can be found here: https://github.com/avdi/pulse-ffi/tree/RubyTapas047
This cautionary episode demonstrates and explains a Hash gotcha that often comes as a surprise.
Somtetimes you need to know if exactly one element in a collection has a given property. For that situation, we have the #one? predicate method.
Today's episode looks at a convenient tool for weeding through text and pulling out parts that match a given pattern.
For such similar and broadly useful data structures, Struct and Hash are surprisingly incompatible. In this episode we look at some ways to smooth over their differences, and answer a …
Following on to the episodes about #fetch, today's episode answers the question: what do we do when we want the same defaulting behavior everwhere a Hash is used?
This episode focuses on OpenStruct, which makes it easy to create ad-hoc value objects from hashes.
In this episode we look at the Tempfile standard library, and how it can facilitate communicating with subprocesses.
In previous episodes we've used the Struct class in passing to quickly construct classes. This time, we put Struct in the spotlight, and put it through its paces. You'll want …