What Are Blocks

Learn about blocks and how they are used.

Defining blocks

Blocks are likely one of Ruby’s most beloved and powerful features. They allow us to write very flexible code. They also read very well and are used all over the place. Moreover, blocks can only be created by the way of passing them to a method when the method is called.

So, what’s a block?

Create a free account to access the full course.

By signing up, you agree to Educative's Terms of Service and Privacy Policy