From: Mike Fletcher Date: 2006-04-14T03:19:56+09:00 Subject: Re: Question mark in attr_* Justin Collins wrote: [...] > This could be pretty handy...but I don't understand why you have the > double negation? >> define_method("#{sym}?") { !!instance_variable_get("@#{sym}") } Maybe so the first ! coerces to a true or false, and the second flips it back to the proper value (so you can set it with whatever value, but the accessor will always return true or false). -- Posted via http://www.ruby-forum.com/.