Jump to ratings and reviews
Rate this book

Using Blocks in Ruby

Rate this book

30 pages, ebook

2 people want to read

About the author

Jay McGavren

5 books

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
0 (0%)
4 stars
2 (66%)
3 stars
1 (33%)
2 stars
0 (0%)
1 star
0 (0%)
Displaying 1 - 2 of 2 reviews
Profile Image for Anton Antonov.
356 reviews53 followers
November 24, 2016
Solid introduction to blocks. Covers very well the basics of blocks.
A good choice by the author to start with `&block` parameter instead of `yield` since the later may be more confusing since it's "invisible" to the reader.
He covers all bases and goes through calling blocks, yielding blocks, multiple block calls and practical exercises for the reader.

The practical classic for teaching blocks to new people is also covered - author shows how to implement your own `Enumerable#each`.


Procs were deemed out-of-scope for the book, but I moderately disagree since they're very tightly coupled with blocks. It seems like a half part of a full blocks intro if they don't teach anything about procs.
Displaying 1 - 2 of 2 reviews