阅读背景:

如何使用Forwardable Module将类方法委托给Ruby中的另一个对象?

来源:互联网 

I'd like to delegate a class method on Bar to an instance of the Foo class, but I can't get the delegation to work. None of the delegated methods throw an error, the getters simply return nil. Here's what my code looks like:I'd like to delegate a class method on Bar to a




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: