Ruby yard
From wikinotes
Tool to write apidocs for ruby. Backwards compatible with ruby rdoc, but introduces newer features.
Documentation
official docs https://yardoc.org/guides/index.html all tags https://rubydoc.info/gems/yard/file/docs/Tags.md#Tag_List homepage https://yardoc.org/
Example
# Converts the object into textual markup given a specific format. # # @param format [Symbol] # the format type, `:text` or `:html` # # @param options [Hash<String,Integer>] # optiosn to do... # # @return [String] # the object converted into the expected format. def to_format(format = :html, options = {}) # format the object end
Common Tags
file header
# @author will pittman # @deprecated deprecated in favour of {#foo}class
# @!attribute [rw] name # @return [String] a read/write attribute (see r,w,rw) #method
# @note you should know that # blah blah blah blah # # @example My Optional Title # 1 + 1 == 2 # ruby code # # # @param smtp_addr [String] # address of the SMTP server # # @param headers [Hash] HashMap containing email headers (options describe map's keys) # @options payload [String] :subject email subjectline # @options payload [String] :from the from email # @options payload [String] :to recipient's email # # # @raise [RuntimeError] if cannot send because... # # @return [String] the message reply # @return [Array] the message replies # # @see https://google.com google's website # @since 1.2.0 # def send_email(headers) end