[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: Method wrapping

Christoph R.

11/27/2003 12:25:00 AM

Yukihiro Matsumoto wrote:
...
> |1. Is it possible to add multiple wrappers for a method or
> not? Do they
> |"stack"?
>
> They stack.

Will it be possible to manipulate this stack? Like

class A
def foo
end
def foo:pre
p 1
end
foo:pre
p 2
end

foo:pre
p 3
end

remove_pre_method :foo
# maybe add the position like
remove_pre_method :foo,1
end

or do I have to just live with my hook method stack
- i.e. only addition to this stack will be possible?

What will happen to this stack if I redefine the
main method? Will this kill the current stack of
hook methods?

/Christoph


1 Answer

matz

11/27/2003 6:09:00 AM

0

Hi,

In message "Re: Method wrapping"
on 03/11/27, "Christoph" <chr_mail@gmx.net> writes:

|Will it be possible to manipulate this stack?

It will. But API is not yet designed.

matz.