I'm starting to learn more about the Ruby object model and trying to understand how the methods are found.
As I understand it, an object searches for a method, checking its own class (going to the right), and if the method is not found there, it goes up the hierarchy of the ancestors.
What am I confused, though ... when he looks into the class, does he read each method from bottom to top or top to bottom?
I think of the first. But if this is true, then it puts me as contrary to what I always understood about how programs are read / interpreted - from top to bottom.
Can someone confirm my understanding of this. Thank.
source
share