Ruby中的Yuidoc式评论?

时间:2013-05-28 15:03:14

标签: 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 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.
  # */

1 个答案:

答案 0 :(得分:1)

您必须在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

=begin 之前的end字符必须在该行的第一列