Learn Ruby
Blocks, Procs and Lambda

Call block

In the above case the greet method is not accepting any block explicitly. Implicitly all methods can accept a block. That’s how Ruby is structurured.

However Ruby also allows us to accept a block explicitly. In order to accept a block explicityly the argument must start with ampersand(&). Usually such arguments are named &block.