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

次のように、YUIDoc コメントを Ruby の複数行コメント内に埋め込む必要があります。

=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

andの前の=文字は、行の最初の列にある必要があります。beginend

于 2013-05-28T15:13:27.873 に答える