Skip to content

Instantly share code, notes, and snippets.

@pazdera
Last active November 5, 2016 02:35
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pazdera/a99cc26fb5c62cdb1a92 to your computer and use it in GitHub Desktop.
Save pazdera/a99cc26fb5c62cdb1a92 to your computer and use it in GitHub Desktop.
Basic Yard Syntax (contributions welcome)
# Quick summary of the function
#
# {ObjectName#method Optional Title}
# {Class::CONSTANT Optional Title}
# {#method_inside_current_namespace}
#
# @see #method
#
# @param one [Fixnum] First parameter
# @param two [Fixnum] Second parameter
# @return [Fixnum] Return value
def method(one, two)
one + two
end
# This function accepts a block.
#
# @yield [a, b] Description of block
# @yieldparam [Fixnum] argname description
# @yieldreturn [Fixnum] description
def block
yield 1, 2
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment