Skip to content

Instantly share code, notes, and snippets.

@thinkerbot
Created February 25, 2014 17:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thinkerbot/9213701 to your computer and use it in GitHub Desktop.
Save thinkerbot/9213701 to your computer and use it in GitHub Desktop.
#!/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