Module: YARD

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

Defined Under Namespace

Modules: CLI, CodeObjects, Handlers, I18n, Parser, Rake, Registry, Serializers, Server, Tags, Templates Classes: Config, Docstring, DocstringParser, Logger, Options, RegistryStore, Verifier

Constant Summary

ROOT =

The root path for YARD source libraries

File.expand_path(File.dirname(__FILE__))
TEMPLATE_ROOT =

The root path for YARD builtin templates

File.join(ROOT, '..', 'templates')
CONFIG_DIR =
Deprecated.
File.expand_path('~/.yard')
VERSION =
'0.8.7.6'

Class Method Summary collapse

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.



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

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

.parse(*args) ⇒ Object

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

Examples:

Parse a glob of files

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

See Also:



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

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

.parse_string(*args) ⇒ Object

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

Examples:

Parse a string of input

YARD.parse_string('class Foo; end')

See Also:



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

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

.ruby18?Boolean

Returns whether YARD is being run in Ruby 1.8 mode

Returns:

  • (Boolean)

    whether YARD is being run in Ruby 1.8 mode



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

def self.ruby18?; !ruby19? end

.ruby19?Boolean

Returns whether YARD is being run in Ruby 1.9 mode

Returns:

  • (Boolean)

    whether YARD is being run in Ruby 1.9 mode



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

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

.ruby2?Boolean

Returns whether YARD is being run in Ruby 2.0

Returns:

  • (Boolean)

    whether YARD is being run in Ruby 2.0



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

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

.windows?Boolean

Returns whether YARD is being run inside of Windows

Returns:

  • (Boolean)

    whether YARD is being run inside of Windows



32
33
34
35
36
37
38
39
40
41
42
# File 'lib/yard.rb', line 32

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