From: Patrick Gundlach Date: 2005-08-13T04:06:11+09:00 Subject: Re: eval, attr_* like methods Hello David, [...] > You'd probably want: > > class Module > def lookup_meth(*args) > args.each do |arg| > define_method(arg) do > instance_variable_get("@#{arg}") > end > define_method("#{arg}=3D") do |v| > instance_variable_set("@#{arg}", v) > end > end > end > end That's cool. Where does 'Module' come into play? What part of class Foo ; end is or is related to 'Module'? Hmm, I think I see: class is an instance of Class, which is a subclass of Module, right? So the above with class Class def lookup_meth(*args) args.each do |arg| .... should do the same? But why is 'def' not a method of Class? Or would be this too tricky to implement, so it is part of some other level of parsing? Patrick