Make toolbar icon using code

It can be in any of the files that define objects for a submodule.

Basically it uses the submodule itself as a mixin module for itself. This makes the defined instance methods available throughout the module without needing the self. qualification.

REF:

I also suggest reading the chapter on mixin modules in the ol’ Pick Axe “Programming Ruby” book. See the book lists in the Ruby Resources lists.