Created
October 23, 2014 16:09
-
-
Save tgautier/6b2e4b4cf40f15ee3db3 to your computer and use it in GitHub Desktop.
This file contains 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 greet(arg1, arg2, name) | |
puts "#{arg1} ---- #{arg2} #{yield(name)}" | |
end | |
me = 'John' | |
greet(1, 2, me) { |name| "Hello #{name}" } | |
greet(1, 2, me) { |name| "Bonjour #{name}" } | |
greet(1, 2, me) { |name| "Hola #{name}" } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment