Last active
July 22, 2016 19:37
-
-
Save Splat/eb508726be2899da0d0424a8d1c57811 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Description goes here! | |
# | |
# * *Params* : | |
# - ++ -> | |
# * *Headers* : | |
# - ++ -> | |
# * *Body* : | |
# - ++ -> | |
# * *Args* : | |
# - ++ -> | |
# * *Returns* : | |
# - | |
# * *Raises* : | |
# - ++ -> | |
# | |
def some_function_name | |
end | |
# An example of properly formatted RDoc given the above template | |
# | |
# * *Args* : | |
# - +foo+ -> a foo for you | |
# - +bar (optional)+ -> and a bar too | |
# * *Returns* : | |
# - A new instance of the Baz class | |
# * *Raises* : | |
# - +ArgumentError+ -> HTTP Status 400, invalid arguments based on type | |
# | |
def do_example foo bar | |
unless foo.is_a?(Number) raise ArgumentError.new("foo should be a number") end | |
unless bar.is_a?(String) raise ArgumentError.new("bar should be a string") end | |
# some computation | |
Baz.new | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Basically this is here for reference because I always forget my nice RDoc formatting which gens some nice lists and formatting in the output of rake doc:app