Created
April 29, 2013 17:18
-
-
Save tibbon/5483141 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 test(x, get_user_ids, get_user_ids) | |
get_user_ids.call(x) do | y | | |
get_user_ids.call(y) | |
end | |
end | |
def get_user_ids x | |
for i in 1 .. 5 | |
yield x * i | |
end | |
end | |
def print_user_ids y | |
puts y | |
end | |
test(2, method(:get_user_ids), method(:print_user_ids)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment