Path: csiph.com!x330-a1.tempe.blueboxinc.net!feeder1.hal-mli.net!weretis.net!feeder1.news.weretis.net!feeder4.news.weretis.net!news.cgarbs.de!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!talisker.lacave.net!lacave.net!not-for-mail From: jake kaiden Newsgroups: comp.lang.ruby Subject: Re: Making a simple parser Date: Sun, 17 Apr 2011 21:10:11 -0500 Organization: Service de news de lacave.net Lines: 22 Message-ID: <3a34d3f4864cb1f1a57e228f477a242a@ruby-forum.com> References: <87adbac7061a00a72e282c160ed42414@ruby-forum.com> <04ac3faa3cf24428d075625283df7645@ruby-forum.com> <166260ce43f6052c38acb58ad1887d60@ruby-forum.com> NNTP-Posting-Host: bristol.highgroove.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: talisker.lacave.net 1303092722 90199 65.111.164.187 (18 Apr 2011 02:12:02 GMT) X-Complaints-To: abuse@lacave.net NNTP-Posting-Date: Mon, 18 Apr 2011 02:12:02 +0000 (UTC) In-Reply-To: <166260ce43f6052c38acb58ad1887d60@ruby-forum.com> X-Received-From: This message has been automatically forwarded from the ruby-talk mailing list by a gateway at comp.lang.ruby. If it is SPAM, it did not originate at comp.lang.ruby. Please report the original sender, and not us. Thanks! For more details about this gateway, please visit: http://blog.grayproductions.net/categories/the_gateway X-Mail-Count: 381762 X-Ml-Name: ruby-talk X-Rubymirror: Yes X-Ruby-Talk: <3a34d3f4864cb1f1a57e228f477a242a@ruby-forum.com> Xref: x330-a1.tempe.blueboxinc.net comp.lang.ruby:3078 Felipe Balbi wrote in post #993383: > Hi Jake, > I want to add another input format > all I would have to do would be to create a new class and the code > would just work. > > With this approach, I would have keep on adding more and more > methods for doing the actual parsing of different formats and what > I wanted was to offload that to another class without touching the > caller code. a very good point - and really what inheritance is for. good luck with a solution, i (and i imagine those who read this post) will keep playing with the idea... hasta otro... -j -- Posted via http://www.ruby-forum.com/.