Skip to content

Instantly share code, notes, and snippets.

@wrburgess
Created March 18, 2012 20:46
Show Gist options
  • Save wrburgess/2081209 to your computer and use it in GitHub Desktop.
Save wrburgess/2081209 to your computer and use it in GitHub Desktop.
TomDoc examples #template #tomdoc #documentation
# reference: http://tomdoc.org/
# Public: Add two numbers together.
#
# value1 - The first number.
# value2 - The second number.
#
# Examples
#
# add(1, 2)
# # => 3
#
# Returns the added numbers.
# Raises Error::100 if the file cannot be found.
def add(value1, value2)
value1 + value2
end
# Public: Add two numbers together.
#
# options - The Hash options used to refine the selection (default: {}):
# :value1 - The first value (optional).
# :value2 - The second value (optional).
#
# Examples
# options = { :value1 => 1, :value2 => 2 }
# add(options)
# # => 3
#
# Returns the added numbers.
# Raises Error::100 if the file cannot be found.
def add(options)
options.value1 + options.value2
end
or
# Internal: Method used internally only.
# Deprecated: Method being removed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment