Ruby中的Yuidoc风格注释?

Ruby中的Yuidoc风格注释?,ruby,documentation,yuidoc,Ruby,Documentation,Yuidoc,如何在Ruby中使用YUIDoc注释?我能想到的最好办法是: ##* # Get Query history # @type {Array} Past search query objects # @param {int} limit The number of objects to return. Defaults to 10. (Max 100). # @param {boolean} only_visible limit the search to visible it

如何在Ruby中使用YUIDoc注释?我能想到的最好办法是:

  ##*
  # Get Query history
  # @type {Array} Past search query objects
  # @param {int} limit The number of objects to return. Defaults to 10. (Max 100).
  # @param {boolean} only_visible limit the search to visible items. Defaults to true.
  #
这是:

  #/**
  # * Get Query history
  # * @type {Array} Past search query objects
  # * @param {int} limit The number of objects to return. Defaults to 10. (Max 100).
  # * @param {boolean} only_visible limit the search to visible items. Defaults to true.
  # */

您必须在Ruby多行注释中嵌入YUIDoc注释,如下所示:

=begin
/**
* Get Query history
* @type {Array} Past search query objects
* @param {int} limit The number of objects to return. Defaults to 10. (Max 100).
* @param {boolean} only_visible limit the search to visible items. Defaults to true.
*/
=end

开始
结束
之前的
=
字符必须位于行的第一列。

必须在Ruby多行注释中嵌入YUIDoc注释,如下所示:

=begin
/**
* Get Query history
* @type {Array} Past search query objects
* @param {int} limit The number of objects to return. Defaults to 10. (Max 100).
* @param {boolean} only_visible limit the search to visible items. Defaults to true.
*/
=end

开始
结束
之前的
=
字符必须位于行的第一列。

。这种款式可以吗?请允许我声明,我是一名javascript开发人员,几乎没有rails经验。它看起来像是CDATA块之类的东西。顺便说一句=begin和=end实际上是做什么的???@AlexKessaris
=begin
=end
是多行注释的分隔符,类似于JavaScript中的
/*
*/
。它们在Ruby代码中非常少见,但在本例中,它们是唯一的选择。酷!谢谢你在这件事上的帮助。顺便说一句,我想知道更多关于Ruby评论的选项。我会在网上查的,但是你的想法也很受欢迎!最后,我想这个问题的结果是采纳了院子式的评论。非常感谢您的帮助@TORO2K。这种款式可以吗?请允许我声明,我是一名javascript开发人员,几乎没有rails经验。它看起来像是CDATA块之类的东西。顺便说一句=begin和=end实际上是做什么的???@AlexKessaris
=begin
=end
是多行注释的分隔符,类似于JavaScript中的
/*
*/
。它们在Ruby代码中非常少见,但在本例中,它们是唯一的选择。酷!谢谢你在这件事上的帮助。顺便说一句,我想知道更多关于Ruby评论的选项。我会在网上查的,但是你的想法也很受欢迎!最后,我想这个问题的结果是采纳了院子式的评论。非常感谢您的帮助@toro2k