Procs and Lambdas in Ruby: how to create them, why they behave differently around arity and return, and when to reach for each in real code.
Tutorial series
Intermediate Ruby
5 tutorials — follow in order for the best learning path.
- Working with Procs and Lambdas in Ruby: a tutorial
- The Enumerable Module
Learn how to use Ruby's Enumerable module—powerful methods for iterating, searching, transforming, and collecting data from collections.
- The Comparable Module
Learn how to use Ruby's Comparable module to add comparison methods to your classes using the spaceship operator.
- Symbols vs Strings in Ruby
Understand the difference between Ruby symbols and strings, when to use each, and why symbols are preferred for hash keys and method identifiers.
- Testing RSpec in Ruby: A Practical BDD Tutorial for Beginners
Hands-on tutorial for testing RSpec in Ruby. Covers describe blocks, matchers, hooks, let, mocking, and BDD-style specs you can use in real projects today.