Created
February 25, 2014 17:31
-
-
Save thinkerbot/9213701 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
#!/usr/bin/env ruby | |
# ruby dance_moves.rb | |
$stdout.sync | |
string = "get down" | |
def dance(move, string) | |
string = string.send(move) | |
print "%s\r" % string | |
sleep 0.3 | |
string | |
end | |
string = dance(:reverse, string) | |
string = dance(:reverse, string) | |
string = dance(:upcase, string) | |
string = dance(:downcase, string) | |
string = dance(:reverse, string) | |
string = dance(:reverse, string) | |
puts |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment