如何在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.
# */
答案 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
字符必须在该行的第一列。