Collected Ruby

Build, retrieve, search, transform, and reduce over collections of data in fluent, expressive, idiomatic Ruby.

From a functional programming perspective, every program is just transformations of data structures, with some side-effects along the way. But there’s a world of nuance in those transformations. Especially in Ruby, which goes to great lengths to provide you with just the right tool for every data-maneuver you could possibly want to execute.

Collected Ruby is an intermediate-to-advanced course in building, retrieving values from, combining, searching, traversing, transforming, and reducing data in Ruby’s core collection classes: Arrays and Hashes. These two classes provide 95% of the collection functionality you need in most programs. For the other 5%, there are specialty collections like Set—which this course also introduces.

There’s a lot of material in this path. Including topics on:

  • Building and combining collections.
  • Extracting just the values you need.
  • Iteration and other forms of collection traversal, including lazy traversal with Enumerators.
  • Efficiently searching and sorting.
  • Transforming and mapping collections from one shape to another.
  • Reducing over collections to gather statistics of various kinds.

This course is a Graceful.Dev Garden Path, meaning it is a suggested pathway through a curated selection of self-contained topics. Its status is mature: new topics may still be added, but it is a fully fleshed-out course of study.

Prerequisites: You’ll need basic Ruby familiarity. This course is part of the Fluent Ruby garden tour, which contains a suggested sequence of courses.

Not Enrolled

Course Includes

  • 8 Modules
  • 58 Topics
Join the Conversation!

Drop us your email and we’ll send you the Code and Grace newsletter. You’ll get highlights from our podcast, news about our recent publications, and notes on what we’re thinking about and enjoying lately.