Language features, syntax, and gotchas.
Category: Language
Episode #106: Class Accessors
Today, some thoughts on writing class-level attribute accessors.
Episode #093: Boolean
A common question on Ruby forums and mailing lists is: "why is there no Boolean data type?". This episode attempts to answer that question.
Episode #090: class<<self
Ruby gives as a number of options when it comes to defining class methods. This episode starts by demonstrating three of them, and then gets a bit opinionated.
Episode #086: Naked Splat
In this episode we tackle how to override base class methods while cleanly passing through multiple base-class arguments. Notes: Paul Battley on Destructuring Assignment in Ruby
Episode #085: Ignore Arguments
Sometimes a block or method may receive arguments that you just don't care about. This episode introduces the idiomatic Ruby way to indicate that certain arguments should be ignored.
Episode #084: Splat Group
Today we take a look at a related feature to Ruby's "splat" operator: the ability to recursively destructure arrays using grouped assignment.
Episode #083: Custom Splat
In today's episode we discover how to make an arbitrary object implicitly "splat"-able.
Episode #081: Implicit Splat
Delving further into Ruby's destructuring assignment, or "splat", mechanism, today we look at some cases where Ruby performs splatting without an explicit '*' operator.