These public methods are in the
Object class, the base class for Ruby. This documentation is adapted and abbreviated from http://www.ruby-doc.org/core/classes/Object.html, where you can find code examples and longer explanations.
Object includes the
Kernel module, whose methods are listed in the next section.
true only if
other are the same object. Typically, this method is overridden in descendant classes to provide class-specific meaning. Unlike
equal? method should never be overridden by subclasses: it is used to determine object identity (that is,
a.equal?(b) if and only if
a is the same object as
eql? method returns
other have the same value.
Object, effectively the same as calling
==, but typically overridden by descendants to provide meaningful semantics in case statements.
Overridden by descendants (notably
String) to provide meaningful pattern-match semantics.
._ _id_ _
Returns an integer identifier for
obj. The same number will be returned on all calls to
id for a given object, and no two active objects will share an
Object#object_id is a different concept from the
:name notation, which returns the symbol
name. Replaces the deprecated
Returns the class of
obj, now preferred over
Object#type, because an object’s type in ...