
2/24/2015
What this post added
This post introduces and details several under-utilized Ruby introspection methods (`#class`, `#is_a?`, `#kind_of?`, `#instance_of?`, `#methods`, `#public_methods`, `#protected_methods`, `#private_methods`, `#singleton_methods`, `#method`, `#caller`, `#instance_variables`, `#instance_variable_get`, `#instance_variable_set`, `#instance_variable_defined?`, `#remove_instance_variable`) and class/module methods (`::name`, `::class_variables`, `::class_variable_get`, `::class_variable_set`, `::class_variable_defined?`, `::remove_class_variable`, `::instance_methods`, `::instance_method`, `::included_modules`, `::superclass`, `Module.nesting`, `::ancestors`, `::constants`, `::const_get`, `::const_set`, `::const_defined?`) that aid in debugging Ruby code. It also provides an overview of debugger commands (`var`, `backtrace`, `frame`, `help`) available in gems like `debugger` and `byebug`.