First page Back Continue Last page Overview Text

Notes:


Here's the method lookup process of an instance of File extended with a module.

Ruby will look at the singleton class of the object, followed by the module you extended the object with, followed by the File class, followed by the ancestors of File, which are class IO, module File::Constants included in IO, module Enumerable included in IO, class Object, and finally module Kernel included in Object.

Any questions on the instance method lookup process?

Now that we've finished the digression on ruby's constant lookup, let's get back to extensible design.