123456789_123456789_123456789_123456789_123456789_

Module: YARD

Relationships & Source Files
Namespace Children
Modules:
Classes:
Defined in: lib/yard/gem_index.rb,
lib/yard.rb,
lib/yard/autoload.rb,
lib/yard/config.rb,
lib/yard/docstring.rb,
lib/yard/docstring_parser.rb,
lib/yard/logging.rb,
lib/yard/open_struct.rb,
lib/yard/options.rb,
lib/yard/registry.rb,
lib/yard/registry_resolver.rb,
lib/yard/registry_store.rb,
lib/yard/server.rb,
lib/yard/verifier.rb,
lib/yard/version.rb,
lib/yard/cli/command.rb,
lib/yard/cli/command_parser.rb,
lib/yard/cli/config.rb,
lib/yard/cli/diff.rb,
lib/yard/cli/display.rb,
lib/yard/cli/gems.rb,
lib/yard/cli/graph.rb,
lib/yard/cli/help.rb,
lib/yard/cli/i18n.rb,
lib/yard/cli/list.rb,
lib/yard/cli/markup_types.rb,
lib/yard/cli/server.rb,
lib/yard/cli/stats.rb,
lib/yard/cli/yardoc.rb,
lib/yard/cli/yardopts_command.rb,
lib/yard/cli/yri.rb,
lib/yard/code_objects/base.rb,
lib/yard/code_objects/macro_object.rb,
lib/yard/code_objects/namespace_mapper.rb,
lib/yard/code_objects/proxy.rb,
lib/yard/code_objects/root_object.rb,
lib/yard/handlers/base.rb,
lib/yard/handlers/processor.rb,
lib/yard/handlers/c/base.rb,
lib/yard/handlers/c/handler_methods.rb,
lib/yard/handlers/ruby/base.rb,
lib/yard/handlers/ruby/dsl_handler.rb,
lib/yard/handlers/ruby/dsl_handler_methods.rb,
lib/yard/handlers/ruby/private_constant_handler.rb,
lib/yard/handlers/ruby/legacy/base.rb,
lib/yard/handlers/ruby/legacy/dsl_handler.rb,
lib/yard/i18n/locale.rb,
lib/yard/i18n/message.rb,
lib/yard/i18n/messages.rb,
lib/yard/i18n/po_parser.rb,
lib/yard/i18n/pot_generator.rb,
lib/yard/i18n/text.rb,
lib/yard/parser/base.rb,
lib/yard/parser/source_parser.rb,
lib/yard/parser/c/c_parser.rb,
lib/yard/parser/c/comment_parser.rb,
lib/yard/parser/c/statement.rb,
lib/yard/parser/ruby/ast_node.rb,
lib/yard/parser/ruby/ruby_parser.rb,
lib/yard/parser/ruby/token_resolver.rb,
lib/yard/parser/ruby/legacy/ruby_lex.rb,
lib/yard/parser/ruby/legacy/ruby_parser.rb,
lib/yard/parser/ruby/legacy/statement.rb,
lib/yard/parser/ruby/legacy/statement_list.rb,
lib/yard/parser/ruby/legacy/token_list.rb,
lib/yard/rake/yardoc_task.rb,
lib/yard/serializers/base.rb,
lib/yard/serializers/file_system_serializer.rb,
lib/yard/serializers/process_serializer.rb,
lib/yard/serializers/stdout_serializer.rb,
lib/yard/serializers/yardoc_serializer.rb,
lib/yard/server/adapter.rb,
lib/yard/server/doc_server_helper.rb,
lib/yard/server/doc_server_serializer.rb,
lib/yard/server/library_version.rb,
lib/yard/server/rack_adapter.rb,
lib/yard/server/router.rb,
lib/yard/server/static_caching.rb,
lib/yard/server/webrick_adapter.rb,
lib/yard/server/commands/base.rb,
lib/yard/server/commands/display_file_command.rb,
lib/yard/server/commands/display_object_command.rb,
lib/yard/server/commands/frames_command.rb,
lib/yard/server/commands/library_command.rb,
lib/yard/server/commands/library_index_command.rb,
lib/yard/server/commands/list_command.rb,
lib/yard/server/commands/root_request_command.rb,
lib/yard/server/commands/search_command.rb,
lib/yard/server/commands/static_file_command.rb,
lib/yard/server/commands/static_file_helpers.rb,
lib/yard/tags/default_factory.rb,
lib/yard/tags/default_tag.rb,
lib/yard/tags/directives.rb,
lib/yard/tags/library.rb,
lib/yard/tags/option_tag.rb,
lib/yard/tags/overload_tag.rb,
lib/yard/tags/ref_tag.rb,
lib/yard/tags/ref_tag_list.rb,
lib/yard/tags/tag.rb,
lib/yard/tags/tag_format_error.rb,
lib/yard/tags/types_explainer.rb,
lib/yard/templates/engine.rb,
lib/yard/templates/erb_cache.rb,
lib/yard/templates/section.rb,
lib/yard/templates/template.rb,
lib/yard/templates/template_options.rb,
lib/yard/templates/helpers/filter_helper.rb,
lib/yard/templates/helpers/html_helper.rb,
lib/yard/templates/helpers/html_syntax_highlight_helper.rb,
lib/yard/templates/helpers/markup_helper.rb,
lib/yard/templates/helpers/method_helper.rb,
lib/yard/templates/helpers/module_helper.rb,
lib/yard/templates/helpers/text_helper.rb,
lib/yard/templates/helpers/uml_helper.rb,
lib/yard/templates/helpers/markup/rdoc_markdown.rb,
lib/yard/templates/helpers/markup/rdoc_markup.rb

Overview

Backward compatibility for gem specification lookup

See Also:

  • Gem::SourceIndex

Constant Summary

Class Attribute Summary

Class Method Summary

Class Attribute Details

.ruby18?Boolean (readonly)

Returns:

  • (Boolean)

    whether YARD is being run in Ruby 1.8 mode

[ GitHub ]

  
# File 'lib/yard.rb', line 44

def self.ruby18?; !ruby19? end

.ruby19?Boolean (readonly)

Returns:

  • (Boolean)

    whether YARD is being run in Ruby 1.9 mode

[ GitHub ]

  
# File 'lib/yard.rb', line 47

def self.ruby19?; @ruby19 ||= (RUBY_VERSION >= "1.9.1") end

.ruby2?Boolean (readonly)

Returns:

  • (Boolean)

    whether YARD is being run in Ruby 2.0

[ GitHub ]

  
# File 'lib/yard.rb', line 50

def self.ruby2?; @ruby2 ||= (RUBY_VERSION >= '2.0.0') end

.ruby31?Boolean (readonly)

Returns:

  • (Boolean)

    whether YARD is being run in Ruby 3.1

[ GitHub ]

  
# File 'lib/yard.rb', line 56

def self.ruby31?; @ruby31 ||= (RUBY_VERSION >= '3.1.0') end

.ruby3?Boolean (readonly)

Returns:

  • (Boolean)

    whether YARD is being run in Ruby 3.0

[ GitHub ]

  
# File 'lib/yard.rb', line 53

def self.ruby3?; @ruby3 ||= (RUBY_VERSION >= '3.0.0') end

.windows?Boolean (readonly)

Returns:

  • (Boolean)

    whether YARD is being run inside of Windows

[ GitHub ]

  
# File 'lib/yard.rb', line 34

def self.windows?
  return @windows if defined? @windows
  require 'rbconfig'
  @windows =
    ::RbConfig::CONFIG['host_os'] =~ /mingw|win32|cygwin/ ? true : false
ensure
  @windows ||= false
end

Class Method Details

.load_pluginsBoolean

Deprecated.

Loads gems that match the name 'yard-' (recommended) or 'yard_' except those listed in ~/.yard/ignored_plugins. This is called immediately after YARD is loaded to allow plugin support.

Returns:

  • (Boolean)

    true if all plugins loaded successfully, false otherwise.

[ GitHub ]

  
# File 'lib/yard.rb', line 31

def self.load_plugins; YARD::Config.load_plugins end

.parse(*args)

An alias to ::YARD::Parser::SourceParser's parsing method

Examples:

Parse a glob of files

YARD.parse('lib/**/*.rb')

See Also:

[ GitHub ]

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

def self.parse(*args) Parser::SourceParser.parse(*args) end

.parse_string(*args)

An alias to ::YARD::Parser::SourceParser's parsing method

Examples:

Parse a string of input

YARD.parse_string('class Foo; end')

See Also:

[ GitHub ]

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

def self.parse_string(*args) Parser::SourceParser.parse_string(*args) end