rubyguides

Tutorial series

Intermediate Ruby

5 tutorials — follow in order for the best learning path.

  1. Working with Procs and Lambdas in Ruby: a tutorial

    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.

  2. The Enumerable Module

    Learn how to use Ruby's Enumerable module—powerful methods for iterating, searching, transforming, and collecting data from collections.

  3. The Comparable Module

    Learn how to use Ruby's Comparable module to add comparison methods to your classes using the spaceship operator.

  4. 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.

  5. 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.