Last active
November 17, 2018 05:07
-
-
Save dymk/e198741cd875572af8e61d3138f0729e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def foo(args, &block) | |
| bar(**args, &block) # I want to call bar with the block passed to foo | |
| end | |
| def bar(arg1:, &block) | |
| block.call(arg1) | |
| end | |
| foo(arg1: "aaa!") do |param| | |
| print param # aaa! | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment