Alex's Slip-box

These are my org-mode notes in sort of Zettelkasten style

yard docs

I can never remember yard doc syntax. Here’s a nice cheatsheet:

https://gist.github.com/chetan/1827484

quick example:

# A method that does stuff and things +this will be rendered inside <code> tag+
# @param bar [String] description of param
# @param baz [Int] description of param
# @yield [bar] description of block
# @raise [ArgumentError] description of the error
def foo(bar:, baz: 0)
  # Do stuff and things
  raise ArgumentError if baz.negative?
  yield bar
end
  • yard handles default params automatically, no need to specify this in the description
  • running yardoc will write documentation files to ./doc by default

Search Results