How should I provide YARD/RDoc documentation for Ruby keyword arguments? [closed] How should I provide YARD/RDoc documentation for Ruby keyword arguments? [closed] ruby ruby

How should I provide YARD/RDoc documentation for Ruby keyword arguments? [closed]


YARD recognizes keyword arguments. This should work:

# @param query [String] The search string# @param exact_match [Boolean] whether to do an exact match# @param results_per_page [Integer] number of resultsdef search(query, exact_match: false, results_per_page: 10)  # ...end