public
Description: YARD is a Ruby Documentation tool (Yay!)
Home | Edit | New

Tag Examples

@param

The param tag is used once per method parameter in a method comment. It can optionally include type information and a description, but must include the parameter name.
From Getting Started


@param [optional, types, ...] argname description

Here’s an example that uses multiple @param tags, with an increasing number of options


    # Create a report
    #
    # @param name
    # @param [Symbol] type 
    # @param [Array<String>] accounts a list of accounts to include
    # @param [Optional Number] num_rows the number of rows
    def create_report(name, type, accounts, num_rows=100)
      # do something
    end

Last edited by bfaloona, Sat Aug 01 22:16:27 -0700 2009
Home | Edit | New
Versions: