DEV Community

Calvin
Calvin

Posted on

Reading Snippets [54 => Ruby] 💎

Blocks in Ruby (like anonymous functions in JavaScript) do not require a name to operate.

There are a few differences between blocks and methods in Ruby. While methods can run more than once, a block only runs once.

Codecademy Ruby Course

Top comments (0)