From: "Michael T. Richter" Date: 2008-07-16T19:35:27+09:00 Subject: Re: Complicated class initialization/instantiation problem. --=-abfOZ/sHVSRht7emRZTR Content-Type: multipart/alternative; boundary="=-iKazXJ4QSheyUXbJW8JF" --=-iKazXJ4QSheyUXbJW8JF Content-Type: text/plain Content-Transfer-Encoding: 7bit On Wed, 2008-07-16 at 16:13 +0900, Pit Capitain wrote: > Hello Michael, to remove the each loop you could change Bar.register > to accept multiple tags, Yeah, I'm ashamed I didn't spot that until after I asked for help. :D > and to avoid copy and paste errors you could > just use "self" instead of the classes: This however I thought of already and tried before posing the question: $ irb irb(main):001:0> class Foo ; p self.class ; end Class => nil irb(main):002:0> See the problem? -- Michael T. Richter (GoogleTalk: ttmrichter@gmail.com) The most exciting phrase to hear in science - the one that heralds new discoveries - is not "Eureka!" but "That's funny..." (Isaac Asimov) --=-iKazXJ4QSheyUXbJW8JF Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 7bit On Wed, 2008-07-16 at 16:13 +0900, Pit Capitain wrote:
Hello Michael, to remove the each loop you could change Bar.register
to accept multiple tags, 

Yeah, I'm ashamed I didn't spot that until after I asked for help.  :D

and to avoid copy and paste errors you could
just use "self" instead of the classes:

This however I thought of already and tried before posing the question:

$ irb
irb(main):001:0> class Foo ; p self.class ; end
Class
=> nil
irb(main):002:0>

See the problem?

--
Michael T. Richter <ttmrichter@gmail.com> (GoogleTalk: ttmrichter@gmail.com)
The most exciting phrase to hear in science - the one that heralds new discoveries - is not "Eureka!" but "That's funny..." (Isaac Asimov)
--=-iKazXJ4QSheyUXbJW8JF-- --=-abfOZ/sHVSRht7emRZTR Content-ID: <1216204765.16866.0.camel@isolde> Content-Disposition: attachment; filename=stock_smiley-6.png Content-Type: image/png; name=stock_smiley-6.png Content-Transfer-Encoding: base64 iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAwlJREFU OI19kctrXGUchp/vO7fMZCan1maSmjapSJA6T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