Created
June 18, 2012 18:41
-
-
Save Poincare/2949938 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
class Robot | |
def forward | |
puts "forward" | |
end | |
def backward | |
puts "backward" | |
end | |
def right | |
puts "right" | |
end | |
def left | |
puts "left" | |
end | |
end | |
Robot.new.instance_eval do | |
forward | |
backward | |
left | |
right | |
right | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment