Mega Code Archive
Categories
/
Ruby
/
Reflection
Unlike instance_of, is_of or kind_of also work if the argument is a superclass or module
myString = "asdf" puts myString.is_a? Object # => true puts myString.kind_of? Kernel # => true puts myString.instance_of? Object # => false