From: David Jacobs Date: 2011-05-12T02:52:02+09:00 Subject: Re: Scope problem (?) in implementing Design Patterns in Ruby --000e0cdfc918ec34c304a303b709 Content-Type: text/plain; charset=ISO-8859-1 I think the second link points to the wrong pastie. I can see a couple of problems with the code, first of which is that you are setting up Expression.new to require an argument but not passing it an argument when you call All_basic.new, etc. More than design patterns (which I think are a little much here), I would suggest looking into Ruby's higher order functions like reduce and map. They make your code a lot simpler. This is an alternate implementation I did. Let me know what you think: http://www.pastie.org/1889838 On Wed, May 11, 2011 at 1:20 PM, RichardOnRails < RichardDummyMailbox58407@uscomputergurus.com> wrote: > Hi, > > I'm hoping that employing "Design Patterns in Ruby" will lead to less > coding errors and more easily maintained code. I'm stuck with the Not > pattern in the File Finding pattern in Chapter 15. > > I've posted my code and output in http://www.pastie.org/1889586 and > http://www.pastie.org/188968, respectively. Any idea about the cause > of the reported syntax error? > > Thanks in Advance, > Richard > > --000e0cdfc918ec34c304a303b709--