---
title: "Discussion on \"How to create methods that accept a block\" | Hashnode"
description: "Discussion on \"How to create methods that accept a block\". In Ruby there are many methods that accept blocks, one of the first that comes to mind is the times method that allows us to run specific block X times. \nNow it's time to learn how to create a method that can accept (and use) a block.\nEverything is d..."
url: "https://hashnode.com/posts/ruby-methods-accept-block/61ade0634389d636ce8b9447"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [How to create methods that accept a block](https://blog.cupofcraft.dev/ruby-methods-accept-block?utm_source=hashnode&utm_medium=feed)

In Ruby there are many methods that accept blocks, one of the first that comes to mind is the times method that allows us to run specific block X times. Now it's time to learn how to create a method that can accept (and use) a block. Everything is d...

Dec 6, 2021 · 3 min read · blog.cupofcraft.dev  
Read the article

-   [#ruby](https://hashnode.com/tag/ruby)
-   [#array-methods](https://hashnode.com/tag/array-methods)

## Written by

[Andrea Barghigiani](https://hashnode.com/@cupofcraft)

@cupofcraft · Alcamo, Italy

  
[View profile](https://hashnode.com/@cupofcraft)

Web, Creative, Teacher

Product Engineer with more of a decade of experience, now working on careercraft.ing to help engineers all over the world to progress in their careers without losing a single win.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
