Flowdock
method

methods

Importance_1
Ruby latest stable (v1_9_3_392) - 0 notes - Class: Object
methods(p1) public

Returns a list of the names of public and protected methods of obj. This will include all the methods accessible in obj’s ancestors.

class Klass
  def klass_method()
  end
end
k = Klass.new
k.methods[0..9]    #=> [:klass_method, :nil?, :===,
                   #    :==~, :!, :eql?
                   #    :hash, :<=>, :class, :singleton_class]
k.methods.length   #=> 57
Show source
Register or log in to add new notes.