Created
January 30, 2011 21:13
-
-
Save kurioscreative/803257 to your computer and use it in GitHub Desktop.
Learning Ruby : Puts methods for Class
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 ObjectPrinter | |
def get_object(item=ObjectPrinter) | |
for method in item.public_instance_methods | |
puts method | |
puts "\n" | |
end | |
end | |
end | |
t = ObjectPrinter.new | |
t.get_object(Object) | |
puts "----------------------------" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment