From: Tim Hunter Date: 2008-04-13T04:05:47+09:00 Subject: Re: Instance Variable On-Change Philipp Hofmann wrote: > On Sun, Apr 13, 2008 at 02:17:37AM +0900, Tim Hunter wrote: >> Ryan Lewis wrote: >>> I need to make a way to run a method when class' instance variable >>> changes from false to true and only run it once. But I have no idea how >>> to do this. >>> >>> Any ideas? >> Check out the observer library. >> >> > > why bother with observer if this can be nicely achieved with an > appropriate setter? something like ... > Good catch! I confess I assumed that the OP would not have asked if a plain setter method would do the trick. -- RMagick: http://rmagick.rubyforge.org/ RMagick 2: http://rmagick.rubyforge.org/rmagick2.html