From: matz@... (Yukihiro Matsumoto) Date: 2003-11-19T02:02:55+09:00 Subject: Re: Yet Another Rite Thought: method combination Hi, I'd recommend you to check CLOS. In message "Re: Yet Another Rite Thought: method combination" on 03/11/18, "Christoph" writes: |> Can you give me an example with 2 classes (inheritance + wrappers) ? | |class A | def foo | p "A" | end | def foo:pre | p "pre_a" | end | def foo:post | p "post_a" | end | | def foo:wrap | super | p "A" | end |end | |class B < A | def foo | super | p "B" | end | def foo:pre > # super # no super in pre method | p "pre_b" | end | def foo:post > # super # no super in post method | p "post_b" | end | | def foo:wrap | super | p "B" | end |end >B.new.foo "pre_b" "pre_a" "A" "B" "post_a" "post_b" "A" # from wrap "B" # from wrap matz.