Ruby - Code Snippet - Methods List
Just a snippet how to print out a sorted list of an object's methods.
puts "\n\object.methods : "+ object.methods.sort.join("\n").to_s+"\n\n"
Jason's Rant...I mean Blog
Just a snippet how to print out a sorted list of an object's methods.
puts "\n\object.methods : "+ object.methods.sort.join("\n").to_s+"\n\n"
5 comments:
Nice nice!
awesome..... really helped at the right time :)
Jaydeep Dave
this is cool, thanks!
In a Rails console you could also type:
Class.methods.sort
where "Class" is the class you are investigating.
er... I meant
y Class.methods.sort.
Post a Comment