From: Brian Buckley Date: 2006-02-14T01:03:44+09:00 Subject: Re: Idiomatic ruby ------=_Part_19300_22369873.1139846608563 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline > > What is the best way to handle this? I could have those methods set > @instance_variables, but this seems a little hackish, and could > introduce race conditions. > I'm not sure I'd agree that it is hackish to set @instance_variables (or perhaps to use a setter instead) to capture learned info. A naming convention might help (maybe remove the "?' and add "_reason") class Foo attr_accessor :valid_reason def valid? ... self.valid_reason =3D "age is too young" false end end ------=_Part_19300_22369873.1139846608563--