阅读背景:

如何将单个对象转换为ruby中可枚举的对象

来源:互联网 

I have a method that can return either a single object or a collection of objects. I want to be able to run object.collect on the result of that method whether or not it is a single object or a collection already. How can i do this?I have a method that can return either a single




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

分享到: