Created
August 24, 2018 13:59
-
-
Save mehdi-farsi/f5c0d9fd957997ee1e1046a1520526c9 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 yield_with_arguments | |
hello = 'Hello' | |
world = 'World!' | |
yield(hello, world) | |
end | |
yield_with_arguments { |hello, world| puts "#{hello} #{world}" } # => Hello World! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment