January 2024
Intermediate to advanced
718 pages
20h 15m
English
One of the advantages of dynamic languages such as Ruby is the ability to introspect—to examine aspects of a program from within the program itself. This is also called reflection.
When people introspect, they think about their thoughts and feelings. This is interesting because we’re using thought to analyze thought. It’s the same when programs use introspection—a program can discover the following information about itself:
Armed with this information, we can look at particular objects and decide which of their methods to call at runtime—even if the class of the object didn’t exist when we first wrote ...
Read now
Unlock full access