From: ara.t.howard@... Date: 2005-12-07T01:47:45+09:00 Subject: Re: getting around access control On Wed, 7 Dec 2005, Ross Bamford wrote: > irb(main):025:0> class ClzThree > irb(main):026:1> protected > irb(main):027:1> def amethod > irb(main):028:2> "amethod" > irb(main):029:2> end > irb(main):030:1> end > => nil > > irb(main):031:0> ClzThree.new.amethod > NoMethodError: protected method `amethod' called for # > from (irb):31 > from :0 > > irb(main):032:0> class ClzThree > irb(main):033:1> public :amethod > irb(main):034:1> end > => ClzThree > > irb(main):037:0> ClzThree.new.amethod > => "amethod" > > ? yeah... technically that works. what i'm doing is having handlered register with a controller to process requests based on mime_type. the handler really needs to be run in the context of the controller to access all the good stuff there but which 'good stuff' is not know a priori so i can't really use this approach. also, it's probably bad mojo to start making methods public that should be private on an object that's directly exposed to the web ;-) cheers. -a -- =============================================================================== | ara [dot] t [dot] howard [at] noaa [dot] gov | all happiness comes from the desire for others to be happy. all misery | comes from the desire for oneself to be happy. | -- bodhicaryavatara ===============================================================================