U
uncutstone
I have a question about ruby's delegate mechanism.
Ruby supports automatic delegate by inherited from DelegateClass or
SimpleDelegator. But what if I want a class can inherit from some other
class but still support automatic delegate. Since ruby doesn't support
multi inheritance, it seems no way.
Why automatic delegate cannot be supported by module instead of class?
Thanks in advance.
Ruby supports automatic delegate by inherited from DelegateClass or
SimpleDelegator. But what if I want a class can inherit from some other
class but still support automatic delegate. Since ruby doesn't support
multi inheritance, it seems no way.
Why automatic delegate cannot be supported by module instead of class?
Thanks in advance.