From: Robert Klemme Date: 2008-01-28T22:54:17+09:00 Subject: Re: Module Global Hash 2008/1/28, James Gray : > On Jan 28, 2008, at 4:18 AM, Robert Klemme wrote: > > > 2008/1/28, Gary Wright : > >> > >> On Jan 28, 2008, at 12:06 AM, Ryan Lewis wrote: > >> > >>> #!/usr/bin/env ruby > >>> module Users > >>> class User < Struct.new(:screenname, :password, :dob, :join_date, > >>> :age) > > > > You do not need to inherit from the new struct class, instead you > > can do > > > > User = Struct.new(:screenname, :password, :dob, :join_date, :age) > > class User > > ... > > end > >> > > I like: > > User = Struct.new(…) do Of course. Unfortunately it does not work with class constants properly. I should have mentioned that. (In my experiments I wanted to use User::USERS.) Thanks for pointing it out! Kind regards robert -- use.inject do |as, often| as.you_can - without end