Skip to content

Instantly share code, notes, and snippets.

@tibbon
Created April 29, 2013 17:18
Show Gist options
  • Save tibbon/5483141 to your computer and use it in GitHub Desktop.
Save tibbon/5483141 to your computer and use it in GitHub Desktop.
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