Hello everyone,

the following idiom is very useful:

module MyModule
	def self.append_features(base)
		super; base.extend(ClassMethods)
	end

	module ClassMethods

		def a_class_method
			puts 'class'
		end
	end
end

class MyClass
	include MyModule
end

MyClass.a_class_method # => 'class'

I think it would be a good idea to have some form of syntactic sugar
for this idiom in Ruby 1.9/2.0

Any ideas ?

-g.


-- 
www.navel.gr | tel: +30 2106898050 | fax: +30 2106898437

web appliction engine: http://www.navel.gr/nitro
have fun: http://www.joy.gr