Skip to content

Instantly share code, notes, and snippets.

@straight-shoota
Created March 2, 2021 02:06
Show Gist options
  • Save straight-shoota/5ece7a73a6cfad5e89bc47beda0ddeb2 to your computer and use it in GitHub Desktop.
Save straight-shoota/5ece7a73a6cfad5e89bc47beda0ddeb2 to your computer and use it in GitHub Desktop.
crystal docs sections
# Foo class for foo.
#
# # Bar methods
# Bar methods to bary things.
#
# * bar
# * bar?
#
# # Baz methods
# Baz methods to bazy things.
class Foo
# @section Bar methods
def bar; end
# @section Bar methods
def bar?; end
# @section Bar methods
def bar!; end
# @section Baz methods
def baz; end
def qux; end
end
### Rendered Structure ###
### Tagged methods can be explicitly referenced in the section prose for order,
### but don't need to be.
# Foo class for foo.
#
# # Bar methods
# Bar methods to bary things.
#
# * def bar
# * def bar?
# * def bar!
#
# # Baz methods
# Baz methods to bazy things.
#
# * def baz
#
# # Other methods
#
# * def qux
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment