instance_variable_get

obj.instance_variable_get(symbol) â obj Instance Public methods Returns the value of the given instance variable, or nil if the instance variable is not set. The @ part of the variable name should be included for regular instance variables. Throws a NameError exception if the supplied symbol is not valid as an instance variable name. class Fred def initialize(p1, p2) @a, @b = p1, p2 end end fred = Fred.new('cat', 99) fred.instance_variable_get(:@a) #=> "cat" fred.

instance_variable_set

obj.instance_variable_set(symbol, obj) â obj Instance Public methods Sets the instance variable names by symbol to object, thereby frustrating the efforts of the class's author to attempt to provide proper encapsulation. The variable did not have to exist prior to this call. class Fred def initialize(p1, p2) @a, @b = p1, p2 end end fred = Fred.new('cat', 99) fred.instance_variable_set(:@a, 'dog') #=> "dog" fred.instance_variable_set(:@c, 'cat') #=> "cat" fred.

instance_variables

obj.instance_variables â array Instance Public methods Returns an array of instance variable names for the receiver. Note that simply defining an accessor does not create the corresponding instance variable. class Fred attr_accessor :a1 def initialize @iv = 3 end end Fred.new.instance_variables #=> [:@iv]

interactive

interactive(str, editfile = nil) Instance Public methods

is_a?

obj.is_a?(class) â true or false Instance Public methods Returns true if class is the class of obj, or if class is one of the superclasses of obj or modules included in obj. module M; end class A include M end class B < A; end class C < B; end b = B.new b.is_a? A #=> true b.is_a? B #=> true b.is_a? C #=> false b.is_a? M #=> true b.kind_of? A #=> true b.kind_of? B #=> true b.kind_of? C #=>

is_macosx?

is_macosx?() Instance Public methods

is_win32?

is_win32?() Instance Public methods fuctions

itemDrag

itemDrag(c,x,y) Instance Public methods

itemEnter

itemEnter(c) Instance Public methods

itemLeave

itemLeave(c) Instance Public methods