# list class methods
SomeClass.methods
# list all instance methods of that class (including all inheritance methods)
SomeClass.instance_methods
# list ancesstor of that class
SomeClass.ancestors
# list public and protected instance methods of an object
<some_object>.methods
# list private instance methods of an object
<some_object>.private_methods
# In rails, list all database columns of a model
SomeModel.column_names #=> <some_model_instance>.attribute_names
# To access instance variable do this
<some_object>.instance_variable_get(:@variable)