Blocks, Procs and Lambda
25.2
Lesson

Ruby blocks accepting arguments

A block can also accept arguments. Here is an example.

When a method accepts an argument then the argument is inside ( ). However when a block accepts an argument then the argument is inside | |.

Here is another example of block accepting argument.