Created
October 23, 2009 12:15
-
-
Save edthix/216837 to your computer and use it in GitHub Desktop.
Ruby bindings with robots!
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
def robot_internals | |
arm = "mechanical hydraulics" | |
return binding | |
end | |
binded = robot_internals | |
arm = "five fingers" | |
eval "puts arm" # five fingers | |
eval "puts arm", binded # mechanical hydraulics | |
eval "arm += ' and not enough'" | |
eval "puts arm" # five fingers and not enough | |
eval "puts arm", binded # mechanical hydraulics | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment