do_not_reverse_lookup

BasicSocket.do_not_reverse_lookup => true or false Class Public methods Gets the global ::do_not_reverse_lookup flag. BasicSocket.do_not_reverse_lookup #=> false

instance_exec

obj.instance_exec(arg...) {|var...| block } â obj Instance Public methods Executes the given block within the context of the receiver (obj). In order to set the context, the variable self is set to obj while the code is executing, giving the code access to obj's instance variables. Arguments are passed as block parameters. class KlassWithSecret def initialize @secret = 99 end end k = KlassWithSecret.new k.instance_exec(5) {|x| @secret+x } #=> 10

instance_eval

obj.instance_eval(string [, filename [, lineno]] ) â objobj.instance_eval {| | block } â obj Instance Public methods Evaluates a string containing Ruby source code, or the given block, within the context of the receiver (obj). In order to set the context, the variable self is set to obj while the code is executing, giving the code access to obj's instance variables. In the version of instance_eval that takes a String, the optional second and third parameter

equal?

obj.equal?(other) â true or false Instance Public methods Equality â At the Object level, == returns true only if obj and other are the same object. Typically, this method is overridden in descendant classes to provide class-specific meaning. Unlike ==, the equal? method should never be overridden by subclasses as it is used to determine object identity (that is, a.equal?(b) if and only if a is the same object as b): obj = "a" other = obj.dup a == other #=> true a.equal?

__send__

foo.send(symbol [, args...]) â objfoo.__send__(symbol [, args...]) â obj Instance Public methods Invokes the method identified by symbol, passing it any arguments specified. You can use __send__ if the name send clashes with an existing method in obj. class Klass def hello(*args) "Hello " + args.join(' ') end end k = Klass.new k.send :hello, "gentle", "readers" #=> "Hello gentle readers"

__id__

obj.__id__ â integerobj.object_id â integer Instance Public methods 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 id. Object#object_id is a different concept from the :name notation, which returns the symbol id of name. Replaces the deprecated Object#id.

==

obj == other â true or false Instance Public methods Equality â At the Object level, == returns true only if obj and other are the same object. Typically, this method is overridden in descendant classes to provide class-specific meaning. Unlike ==, the equal? method should never be overridden by subclasses as it is used to determine object identity (that is, a.equal?(b) if and only if a is the same object as b): obj = "a" other = obj.dup a == other #=> true a.equal?

!=

obj != other â true or false Instance Public methods Returns true if two objects are not-equal, otherwise false.

!

!obj â true or false Instance Public methods Boolean negate.

new

new() Class Public methods Not documented