Okay, now I'm trying to better understand how delegate.rb works b/c I
would like to reuse the principle behind it elsewhere. But I don't
understand one thing. How is self being redirected?
class SD < SimpleDelegator
def bracket
p self
end
end
class C
end
c = C.new
sd = SD.new(c)
sd.bracket
produces
#<C:0x40329350>
How does self become c in the context of sd? I don't see how
delegate.rb achieves this.
Thanks,
T.