On Wed, Aug 22, 2012 at 1:45 PM, Jan E. <[email protected]> wrote:
> Those are method *calls*, not method definitions.
Also the call to #plate does not introduce a scope. If at all the
scope is opened by the block passed to #plate.
> I'm pretty sure listing method calls is complicated and requires a deep
> analysis of Ruby internals.
For a first start one can do
plate do
p method(:serve), method(:eat)
serve do |d|
d.pizza 2
d.momo 5
end
eat do |d|
d.pizza 1
d.momo 2
end
end
The output will tell you something about the class in which the method
is defined.
> What do you need that for?
I second that question.
Kind regards
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