我需要标记返回类而不是实例的方法的 @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>]但我一直无法找到类似的文档。