Skip to content

Instantly share code, notes, and snippets.

@kurioscreative
Created January 30, 2011 21:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save kurioscreative/803257 to your computer and use it in GitHub Desktop.
Save kurioscreative/803257 to your computer and use it in GitHub Desktop.
Learning Ruby : Puts methods for Class
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