On Wed, Aug 22, 2012 at 6:04 PM, Dipesh Gtm <[email protected]> wrote:
> I'm instance_eval-ing the plate block and then trying to hook up method
> missing to call serve and eat methods. The problem is that this is on a
> class level scope so every-undefined-method passes on to method missing.

Yes, that's regular behavior for every object.

> I could get away with defining a pattern and then using a regex but
> since it is enclosed in the plate block, I was wondering if there was a
> more natural way available to infer methods/method calls that happen
> inside the block scope. Does this make sense?

I still do not understand what your issue is: if you know where you
want to invoke those methods then method_missing can simply delegate
to the instance.  Other than that, what else do you want to do with
methods which are not defined and of which you do not know where they
are?

Can you show more code, namely the code which invokes instance_eval
and demonstrate what it is supposed to do?

Cheers

robert

-- 
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/

-- You received this message because you are subscribed to the Google Groups 
ruby-talk-google group. To post to this group, send email to 
[email protected]. To unsubscribe from this group, send email 
to [email protected]. For more options, visit this 
group at https://groups.google.com/d/forum/ruby-talk-google?hl=en

Reply via email to