obj.instance_of?(class) รข true or false
Instance Public methods
Returns true
if obj is an instance of the given
class. See also Object#kind_of?
.
class A; end class B < A; end class C < B; end b = B.new b.instance_of? A #=> false b.instance_of? B #=> true b.instance_of? C #=> false
Please login to continue.