X
Xeno Campanoli
I'm looking for a way to make sure an object being passed is in some class
family, or to say it otherwise, inherits some specific class, but not
necessarily directly. In fact, it could be a great-great-grandparent class, and
that would be okay, and needs to be okay. Is there something where I can take
an object and go
unless object.inherits?(MyClass)
raise SyntaxError, "etc."
end
?????
Sorry, but could not find this in my pickaxe book.
family, or to say it otherwise, inherits some specific class, but not
necessarily directly. In fact, it could be a great-great-grandparent class, and
that would be okay, and needs to be okay. Is there something where I can take
an object and go
unless object.inherits?(MyClass)
raise SyntaxError, "etc."
end
?????
Sorry, but could not find this in my pickaxe book.