From: Daniel Sheppard Date: 2005-10-10T14:13:18+09:00 Subject: Re: Quick module include question. module Attributes def att(*atts) atts.each do |att| class_eval %{ def #{att} val=nil val == nil ? @#{att} : @#{att} = val end } end end end class World extend Attributes att :title, :author end w = World.new w.title "Title" w.author "Author" p w.title => "Title" p w.author => "Author" ##################################################################################### This email has been scanned by MailMarshal, an email content filter. #####################################################################################