Created
June 28, 2011 20:18
-
-
Save 8th-Light-Blog/1052087 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
Blog Title: Meta-programming Comes Naturally to Intern | |
Author: Doug Bradbury | |
Date: June 22nd, 2009 |
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
tree = OrangeTree.new | |
command = gets | |
tree.command |
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
tree = OrangeTree.new | |
command = gets.chomp.to_sym | |
tree.send(command) if tree.responds_to?(command) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment