This post originated from an RSS feed registered with Ruby Buzz
by Matt Williams.
Original Post: methods, public_methods, and private_methods
Feed Title: Ramblings
Feed URL: http://feeds.feedburner.com/matthewkwilliams
Feed Description: Musings of Matt Williams
Ruby’s Object has a method, methods. You can use it to see the methods which an object has. Sort of. In this post I’m examining methods, public_methods, and private_methods as well as some of their implications.
Let’s take this simple class and look at it:
class MethodsTest
attr_reader :foo
def initialize(foo=nil)
[...]