For the easiest thing, just stick with your first example of using
instance methods, and then “include Blah”. Why it works and what is
doing probably won’t really apparent, though.
You want to look into Mixins (and the keywords extend and include),
but you also want to get a good understanding of what local (self)
means in this context, because that will make which incantation you
want much easier to figure out, and rarely are you going to want to do
a bare include Foo or extend Foo on the top level context like that.
You should read the pickaxe as a bare minimum. The section on Modules
is a start: http://www.rubycentral.com/pickaxe/tut_modules.html Jay
Fields has a good intro, though, too that might answer your question
Then you can start looking into the ClassMethods include idioms and