문제

How can I use YUIDoc comments in Ruby? The best I can come up with is this:

  ##*
  # 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.
  #

And this:

  #/**
  # * 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.
  # */
도움이 되었습니까?

해결책

You have to embed YUIDoc comments inside a Ruby multiline comment, like this:

=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

The = character before begin and end must be on the first column of the line.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top