【发布时间】:2017-05-22 07:08:55
【问题描述】:
我需要标记返回类而不是实例的方法的@return 类型。示例:
# @return [String] # This implies that the return type is a String object
def string_class
String # The method actually returns the String class itself
end
YARD 有这方面的标准吗?我的第一个猜测是@return [Class<String>],但我找不到类似的文档。
【问题讨论】:
-
我只想写
@return [Class]