ringdocdocumentation for Ring packages

Directives

A line with a directive in a page is replaced by a file, an output or a reference made from the package.

Files#

The paths of the directives are relative to :root of the project. {{file:}} shows the file as it is in a code block, {{source:}} shows it in a block that starts folded.

{{file:samples/UsingRingDoc/hello/demo.ring}}
samples/UsingRingDoc/hello/demo.ring
load "hello.ring"

? greet("Ring")
oGreeter = new Greeter("fr")
? oGreeter.say("Ring")

Output#

{{output:demo.ring}} runs the program and shows what it prints. The output is kept in .ringdoc-cache in the project folder; build --refresh runs it again. Arguments follow the path: {{output:tool.ring --demo}}.

{{output:samples/UsingRingDoc/hello/demo.ring}}
Output
Hello, Ring!
Bonjour, Ring!

Functions#

{{functions:file.ring}} is a table of the functions and methods of a Ring file and the comment above each.

Package facts#

{{package:package.ring}} is a table made from the package.ring of a RingPM package: name, description, version, developer, license, Ring version, the packages it needs and the install command. {{package:package.ring files}} adds the list of the files.

Reference#

{{reference:a.ring b.ring}} is the full reference of the files: a table of the functions, then a section for each class with its attributes and methods. {{index:a.ring b.ring}} is an alphabetical list of the names linked to them on the same page.

A comment is the # or // lines just above a function, class or attribute; a blank line ends it. After the first class line every func is a method of the class, the order of Ring (statements, functions, classes). The members after private and the names in :hide are left out.

{{reference:samples/UsingRingDoc/hello/hello.ring}}
FunctionDescription
greeting(cLanguage)The greeting of a language: "en", "fr" or "ar"
greet(cName)A greeting for a name: greet("Ring") is "Hello, Ring!"

Greeter

AttributeValueDescription
cLanguage"en"
MethodDescription
init(cNewLanguage)The greeter greets in a language
say(cName)The greeting for a name, in the language of the greeter

Your own directives#

A project can define more of them: see Extending ringdoc.

ringdoc - documentation made with ringdoc.