小编dtr*_*oof的帖子

返回类的方法的 YARD 文档

我需要标记返回类而不是实例的方法的 @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
Run Code Online (Sandbox Code Playgroud)

YARD有这方面的标准吗?我的第一个猜测是,@return [Class<String>]但我一直无法找到类似的文档。

ruby yard

4
推荐指数
1
解决办法
1242
查看次数

标签 统计

ruby ×1

yard ×1