Yard hash option
Note that parametrized types are typically not order-dependent, in other words, a list of parametrized types can occur in any order inside of a type. Duck-types method names prefixed yard hash option " " are also allowed. In all other cases, add documentation to the method definition itself. To add a custom tag via the command-line or. Although custom tags can be parsed in any way, the built-in tags yard hash option a few common syntax structures by convention in order to simplify the syntax.
For example, yard hash option parameters of a method can often be important to your documentation, but should not be mixed up with the documentation that describes what the method itself does. The typical yard hash option is to indent subsequent lines by 2 spaces. Instead, they affect the parsing context and objects themselves, allowing a developer to create objects like methods outright, rather than simply add text to an existing object.
Using a void return tag is recommended over no type, because it makes the documentation more explicit about what the user should expect. This is why the types specifier list is freeform and can contain any set of values. For example, to yard hash option a basic freeform tag, yard hash option Meta-Data Tags Meta-data tags are useful to add arbitrary meta-data about a documented object.
If you define parameters with yieldparamyou do not need to define the parameters in the type specification of yield as well. Note that a types specifier list might also be used for non-Type values. Tags Overview Tags yard hash option meta-data as well as behavioural data that can be added yard hash option documentation through the tag style syntax. Class or Module Types Any Ruby type is allowed as a class or module type.
This tag should only be used to mark objects private when Ruby visibility yard hash option cannot do so. Class or Module Types Any Ruby type is allowed as a class or module type. Note that one extra type that is accepted by convention is the Boolean type, which represents both the TrueClass and FalseClass types.
Yard hash option you simply want to set the API visibility of a method, you should look at the api tag instead. Defines a method object with a given method signature, using indented block data as the method's docstring. For instance, a method may copy all param tags from a yard hash option object using the reference tag syntax: Reference Tags Reference tag syntax applies only to meta-data tags, not directives.
To define an attribute method, see! Tags Overview Tags represent meta-data as well as behavioural data that can be added to documentation through the tag style syntax. Note that for extensibility, the name yard hash option be placed before the types list, like: This directive is useful if a class has dynamic meta-programmed behaviour that cannot be recognized by YARD.
Documents a single method parameter either regular or keyword with a given name, type and optional description. The first line must also always refer to the "title" portion, and therefore, if there is no title, the first line must be blank. However, some tags like exampleoverload ,! For instance, the example tag uses the first line to indicate the example's title. Declares that the logical visibility of an object is private.