Archive for February, 2008

Modules Part II - Strange Brew

« 4 February 2008 | 19:23 | patterns/idiom/style, Ruby Internals, MRI | Comments Off »

This post continues to look at Ruby Modules and their properties.
It’s possible to mix a Module into a second Module which can then be mixed into a class. The result is that an entire Module chain is moved into the a classes inheritance chain with one call to include.

module OneStrand
end

module TwoStrand
include OneStrand
end

class […]