Created
October 20, 2011 12:33
-
-
Save bitlyfied/1301035 to your computer and use it in GitHub Desktop.
RobotDance (Ruby DSL example)
This file contains hidden or 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
class RobotDance | |
def initialize (&block) | |
instance_eval &block if block | |
end | |
def move_arms | |
puts "swosh!" | |
end | |
def shake_booty | |
puts "shaking my robotic booty" | |
end | |
end | |
RobotDance.new do | |
move_arms | |
move_arms | |
shake_booty | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment