On Wed, 20 Jun 2001, Steve Tuckner wrote:
> This worked when put into the class itself but not when using "extend"? Any
> idea why?

I don't know, it works here, let me rewrite it:

module UserClass
	attr_reader :uservars
	def uservar(sym,info)
		@uservars ||= {}
		@uservars[sym] = info
	end
end

class Address; extend UserClass
	uservar :street, { :Name => "Street" }
	uservar :city, { :Name => "City" }
	uservar :country, { :Name => "Country" }
	uservar :postal_code, { :Name => "Postal Code" }
end

This works here. However for a long time I've forgot about inheritance of
class methods (what Matz used in his example). I'm going to start using
that instead of that #extend trick. 

matju