Introspection of class

suggest change

Lets following are the class definition

class Adef a; endendmodule Bdef b; endendclass C < Ainclude Bdef c; endend

What are the instance methods of C?

C.instance_methods # [:c, :b, :a, :to_json, :instance_of?...]

What are the instance methods that declare only on C?

C.instance_methods(false) # [:c]

What are the ancestors of class C?

C.ancestors # [C, B, A, Object,...]

Superclass of C?

C.superclass # A

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents