Class: YARD::CLI::YardocOptions

Inherits:
Templates::TemplateOptions show all
Defined in:
lib/yard/cli/yardoc.rb

Overview

Default options used in yard doc command.

Direct Known Subclasses

Server::Commands::LibraryOptions

Instance Attribute Summary collapse

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class YARD::Options

Instance Attribute Details

#default_returnString Originally defined in class Templates::TemplateOptions

Returns the default return type for a method with no return tags

Returns:

  • (String)

    the default return type for a method with no return tags

#embed_mixinsArray<String> Originally defined in class Templates::TemplateOptions

Returns an array of module name wildcards to embed into class documentation as if their methods were defined directly in the class. Useful for modules like ClassMethods. If the name contains '::', the module is matched against the full mixin path, otherwise only the module name is used.

Examples:

A list of mixin path names (including wildcards)

opts.embed_mixins #=> ['ClassMethods', '*Helper', 'YARD::*']

Returns:

  • (Array<String>)

    an array of module name wildcards to embed into class documentation as if their methods were defined directly in the class. Useful for modules like ClassMethods. If the name contains '::', the module is matched against the full mixin path, otherwise only the module name is used.

#fileCodeObjects::ExtraFileObject

Returns the file object being rendered. The object key is not used so that a file may be rendered in the context of an object's namespace (for generating links).

Returns:

  • (CodeObjects::ExtraFileObject)

    the file object being rendered. The object key is not used so that a file may be rendered in the context of an object's namespace (for generating links).



47
48
49
# File 'lib/yard/cli/yardoc.rb', line 47

def file
  @file
end

#formatSymbol Originally defined in class Templates::TemplateOptions

Returns the template output format

Returns:

  • (Symbol)

    the template output format

#globalsOpenStruct Also known as: __globals Originally defined in class Templates::TemplateOptions

Returns an open struct containing any global state across all generated objects in a template.

Returns:

  • (OpenStruct)

    an open struct containing any global state across all generated objects in a template.

#hide_void_returnBoolean Originally defined in class Templates::TemplateOptions

Returns whether void methods should show “void” in their signature

Returns:

  • (Boolean)

    whether void methods should show “void” in their signature

#highlightBoolean Originally defined in class Templates::TemplateOptions

Returns whether code blocks should be syntax highlighted

Returns:

  • (Boolean)

    whether code blocks should be syntax highlighted

#indexNumeric

Returns An index value for rendering sequentially related templates

Returns:

  • (Numeric)

    An index value for rendering sequentially related templates



38
39
40
# File 'lib/yard/cli/yardoc.rb', line 38

def index
  @index
end

#indexBoolean Originally defined in class Templates::TemplateOptions

Returns whether the page is the “index”

Returns:

  • (Boolean)

    whether the page is the “index”

#itemCodeObjects::Base

Returns an extra item to send to a template that is not the main rendered object

Returns:

  • (CodeObjects::Base)

    an extra item to send to a template that is not the main rendered object



42
43
44
# File 'lib/yard/cli/yardoc.rb', line 42

def item
  @item
end

#localeString

Returns the current locale

Returns:

  • (String)

    the current locale



51
52
53
# File 'lib/yard/cli/yardoc.rb', line 51

def locale
  @locale
end

#markupSymbol Originally defined in class Templates::TemplateOptions

Returns the markup format to use when parsing docstrings

Returns:

  • (Symbol)

    the markup format to use when parsing docstrings

#markup_providerClass Originally defined in class Templates::TemplateOptions

Returns the markup provider class for the markup format

Returns:

  • (Class)

    the markup provider class for the markup format

#no_highlightBoolean Originally defined in class Templates::TemplateOptions

Deprecated.

use #highlight instead.

Returns whether highlighting should be ignored

Returns:

  • (Boolean)

    whether highlighting should be ignored

#objectCodeObjects::Base Originally defined in class Templates::TemplateOptions

Returns the main object being generated in the template

Returns:

#objectsArray<CodeObjects::Base>

Returns the list of code objects to render the templates with.

Returns:



35
36
37
# File 'lib/yard/cli/yardoc.rb', line 35

def objects
  @objects
end

#ownerCodeObjects::Base Originally defined in class Templates::TemplateOptions

Returns the owner of the generated object

Returns:

#page_titleString Originally defined in class Templates::TemplateOptions

Returns the title of a given page

Returns:

  • (String)

    the title of a given page

#readmeCodeObjects::ExtraFileObject

Returns the README file object rendered along with objects

Returns:



31
32
33
# File 'lib/yard/cli/yardoc.rb', line 31

def readme
  @readme
end

#serializeBoolean Originally defined in class Templates::TemplateOptions

Returns whether serialization should be performed

Returns:

  • (Boolean)

    whether serialization should be performed

#serializerSerializers::Base Originally defined in class Templates::TemplateOptions

Returns the serializer used to generate links and serialize output. Serialization output only occurs if #serialize is true.

Returns:

  • (Serializers::Base)

    the serializer used to generate links and serialize output. Serialization output only occurs if #serialize is true.

#templateSymbol Originally defined in class Templates::TemplateOptions

Returns the template name used to render output

Returns:

  • (Symbol)

    the template name used to render output

#typeSymbol Originally defined in class Templates::TemplateOptions

Returns the template type used to generate output

Returns:

  • (Symbol)

    the template type used to generate output

#verifierVerifier Originally defined in class Templates::TemplateOptions

Returns the verifier object

Returns:

Instance Method Details

#filesArray<CodeObjects::ExtraFileObject>

Returns the list of extra files rendered along with objects

Returns:



10
# File 'lib/yard/cli/yardoc.rb', line 10

default_attr :files, lambda { [] }

#formatSymbol

Returns the default output format (:html).

Returns:

  • (Symbol)

    the default output format (:html).



23
# File 'lib/yard/cli/yardoc.rb', line 23

default_attr :format, :html

#onefileBoolean

Returns whether the data should be rendered in a single page, if the template supports it.

Returns:

  • (Boolean)

    whether the data should be rendered in a single page, if the template supports it.



27
# File 'lib/yard/cli/yardoc.rb', line 27

default_attr :onefile, false

#serializerSerializers::Base

Returns the default serializer for generating output to disk.

Returns:



20
# File 'lib/yard/cli/yardoc.rb', line 20

default_attr :serializer, lambda { Serializers::FileSystemSerializer.new }

#titleString

Returns the default title appended to each generated page

Returns:

  • (String)

    the default title appended to each generated page



13
# File 'lib/yard/cli/yardoc.rb', line 13

default_attr :title, "Documentation by YARD #{YARD::VERSION}"

#verifierVerifier

Returns the default verifier object to filter queries

Returns:

  • (Verifier)

    the default verifier object to filter queries



16
# File 'lib/yard/cli/yardoc.rb', line 16

default_attr :verifier, lambda { Verifier.new }