Created
July 19, 2015 17:30
-
-
Save ainoya/9141866245895c55d421 to your computer and use it in GitHub Desktop.
wait
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 wait? &block | |
i = 1 | |
while i < 5 do | |
block.call(i) | |
sleep 0.2 | |
i = i+1 | |
end | |
end | |
a = wait? do |i| | |
puts "count #{i}" | |
end | |
puts a | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment