obj.methods(all=true) â array
Instance Public methods
Returns a list of the names of public and protected methods of
obj. This will include all the methods accessible in
obj's ancestors. If the all parameter is set to
false, only those methods in the receiver will be listed.
class Klass
def klass_method()
end
end
k = Klass.new
k.methods[0..9] #=> [:klass_method, :nil?, :===,
# :==~, :!, :eql?
# :hash, :<=>, :class, :si