Mixing in class methods

Mark J. Reed wrote:

Okay, probably a dumb question, but: is there any way to define
methods in a module which become class methods of any class which
includes that module?

I can’t remember the details off the top of my head by I think it involved
using “extend” instead of “include”. So with your example:

module Foo;
class << self
def foo; puts "foo!"; end
end
end

class Bar
extend Foo
end

Bar.foo

When I get back to my desk at home I can check some code that I have where I
did the same thing.

Eric