Module: YARD
- Defined in:
- lib/yard.rb,
lib/yard/cli/yri.rb,
lib/yard/logging.rb,
lib/yard/autoload.rb,
lib/yard/cli/diff.rb,
lib/yard/cli/gems.rb,
lib/yard/cli/help.rb,
lib/yard/registry.rb,
lib/yard/tags/tag.rb,
lib/yard/verifier.rb,
lib/yard/cli/graph.rb,
lib/yard/cli/stats.rb,
lib/yard/docstring.rb,
lib/yard/cli/server.rb,
lib/yard/cli/yardoc.rb,
lib/yard/cli/command.rb,
lib/yard/parser/base.rb,
lib/yard/tags/library.rb,
lib/yard/tags/ref_tag.rb,
lib/yard/handlers/base.rb,
lib/yard/server/router.rb,
lib/yard/registry_store.rb,
lib/yard/server/adapter.rb,
lib/yard/parser/c_parser.rb,
lib/yard/tags/option_tag.rb,
lib/yard/rake/yardoc_task.rb,
lib/yard/serializers/base.rb,
lib/yard/tags/default_tag.rb,
lib/yard/templates/engine.rb,
lib/yard/code_objects/base.rb,
lib/yard/tags/overload_tag.rb,
lib/yard/tags/ref_tag_list.rb,
lib/yard/templates/section.rb,
lib/yard/cli/command_parser.rb,
lib/yard/code_objects/proxy.rb,
lib/yard/handlers/processor.rb,
lib/yard/handlers/ruby/base.rb,
lib/yard/templates/template.rb,
lib/yard/server/rack_adapter.rb,
lib/yard/templates/erb_cache.rb,
lib/yard/parser/ruby/ast_node.rb,
lib/yard/parser/source_parser.rb,
lib/yard/server/commands/base.rb,
lib/yard/tags/default_factory.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/code_objects/root_object.rb,
lib/yard/server/doc_server_helper.rb,
lib/yard/handlers/ruby/legacy/base.rb,
lib/yard/parser/ruby/legacy/ruby_lex.rb,
lib/yard/parser/ruby/legacy/statement.rb,
lib/yard/server/commands/list_command.rb,
lib/yard/server/doc_server_serializer.rb,
lib/yard/templates/helpers/uml_helper.rb,
lib/yard/parser/ruby/legacy/token_list.rb,
lib/yard/serializers/stdout_serializer.rb,
lib/yard/serializers/yardoc_serializer.rb,
lib/yard/templates/helpers/html_helper.rb,
lib/yard/templates/helpers/text_helper.rb,
lib/yard/parser/ruby/legacy/ruby_parser.rb,
lib/yard/serializers/process_serializer.rb,
lib/yard/server/commands/frames_command.rb,
lib/yard/server/commands/search_command.rb,
lib/yard/server/commands/library_command.rb,
lib/yard/templates/helpers/filter_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/parser/ruby/legacy/statement_list.rb,
lib/yard/serializers/file_system_serializer.rb,
lib/yard/server/commands/static_file_command.rb,
lib/yard/server/commands/display_file_command.rb,
lib/yard/server/commands/library_index_command.rb,
lib/yard/server/commands/display_object_command.rb,
lib/yard/templates/helpers/html_syntax_highlight_helper.rb,
lib/yard/templates/helpers/html_syntax_highlight_helper18.rb
Defined Under Namespace
Modules: CLI, CodeObjects, Handlers, Parser, Rake, Registry, Serializers, Server, Tags, Templates Classes: Docstring, Logger, RegistryStore, Verifier
Constant Summary collapse
- VERSION =
"0.6.0"
- ROOT =
The root path for YARD source libraries
File.(File.dirname(__FILE__))
- TEMPLATE_ROOT =
The root path for YARD builtin templates
File.join(ROOT, '..', 'templates')
- CONFIG_DIR =
The location where YARD stores user-specific settings
File.('~/.yard')
Class Method Summary collapse
-
.load_plugins ⇒ true
Loads gems that match the name ‘yard-*’ (recommended) or ‘yard_*’ except those listed in ~/.yard/ignored_plugins.
-
.parse(*args) ⇒ Object
An alias to Parser::SourceParser‘s parsing method.
-
.parse_string(*args) ⇒ Object
An alias to Parser::SourceParser‘s parsing method.
Class Method Details
.load_plugins ⇒ true
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.
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/yard.rb', line 32 def self.load_plugins ignored_plugins_file = File.join(CONFIG_DIR, "ignored_plugins") if File.file?(ignored_plugins_file) ignored_plugins = IO.read(ignored_plugins_file).split(/\s+/) else ignored_plugins = [] end Gem.source_index.find_name('').each do |gem| begin if gem.name =~ /^yard[-_](?!doc-)/ && !ignored_plugins.include?(gem.name) log.debug "Loading plugin '#{gem.name}'..." require gem.name end rescue Gem::LoadError, LoadError log.warn "Error loading plugin '#{gem.name}'" end end true end |
.parse(*args) ⇒ Object
An alias to YARD::Parser::SourceParser‘s parsing method
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
25 |
# File 'lib/yard.rb', line 25 def self.parse_string(*args) Parser::SourceParser.parse_string(*args) end |