1

如何在 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.
  # */
4

1 回答 1

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 必须在该行的第一列。

于 2013-05-28T15:13:27.873 回答