O'Reilly logo

Mastering Ruby Closures by Benjamin Tan Wei Hao

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

What’s in This Book

This book is broken into four parts. The first three parts get you comfortable with blocks, Procs, and lambdas, and the last part gives you some practice using those concepts.

In Chapter 1, Closing in on Closures, you’ll explore the basics of closures. This chapter lays the groundwork for the rest of the book.

In Chapter 2, Beautiful Blocks, you’ll dive into blocks, where you’ll start with the basics and build your very own implementations of Enumerable and Enumerator in Ruby. You’ll learn about the patterns that involve blocks and how they are used in real-world code.

In Chapter 3, The Power of Procs and Lambdas, you’ll learn how to create and use Procs and lambdas, and you’ll learn to appreciate the special ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required