ruby on rails - How can I know whether a class is inherited from another one? Some methods like is_a? -


simple example:

class end  class b < end 

then, how can judge whether class b inherited class a? there method somehow is_a? or maybe called is_child_of??

i can't find one.

you can use < operator:

b < a true, if b subclass of a.


Comments

Popular posts from this blog

windows - Why does Vista not allow creation of shortcuts to "Programs" on a NonAdmin account? Not supposed to install apps from NonAdmin account? -

c++ - How do I get a multi line tooltip in MFC -

ssis - How do I fix the error unable to enlist Sybase database in distributed transaction? -