hyper-pro-gem 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/hyper-pro-gem.gemspec +12 -0
- data/yard-0.9.44/CHANGELOG.md +983 -0
- data/yard-0.9.44/LEGAL +94 -0
- data/yard-0.9.44/LICENSE +22 -0
- data/yard-0.9.44/README.md +329 -0
- data/yard-0.9.44/bin/yard +13 -0
- data/yard-0.9.44/bin/yardoc +13 -0
- data/yard-0.9.44/bin/yri +13 -0
- data/yard-0.9.44/docs/CodeObjects.md +115 -0
- data/yard-0.9.44/docs/GettingStarted.md +705 -0
- data/yard-0.9.44/docs/Handlers.md +152 -0
- data/yard-0.9.44/docs/Overview.md +61 -0
- data/yard-0.9.44/docs/Parser.md +166 -0
- data/yard-0.9.44/docs/Tags.md +304 -0
- data/yard-0.9.44/docs/TagsArch.md +123 -0
- data/yard-0.9.44/docs/Templates.md +497 -0
- data/yard-0.9.44/docs/WhatsNew.md +1297 -0
- data/yard-0.9.44/docs/images/code-objects-class-diagram.png +0 -0
- data/yard-0.9.44/docs/images/handlers-class-diagram.png +0 -0
- data/yard-0.9.44/docs/images/overview-class-diagram.png +0 -0
- data/yard-0.9.44/docs/images/parser-class-diagram.png +0 -0
- data/yard-0.9.44/docs/images/tags-class-diagram.png +0 -0
- data/yard-0.9.44/docs/templates/default/fulldoc/html/full_list_tag.erb +9 -0
- data/yard-0.9.44/docs/templates/default/fulldoc/html/setup.rb +6 -0
- data/yard-0.9.44/docs/templates/default/layout/html/setup.rb +9 -0
- data/yard-0.9.44/docs/templates/default/layout/html/tag_list.erb +11 -0
- data/yard-0.9.44/docs/templates/default/yard_tags/html/list.erb +18 -0
- data/yard-0.9.44/docs/templates/default/yard_tags/html/setup.rb +26 -0
- data/yard-0.9.44/docs/templates/plugin.rb +70 -0
- data/yard-0.9.44/lib/rubygems_plugin.rb +9 -0
- data/yard-0.9.44/lib/yard/autoload.rb +328 -0
- data/yard-0.9.44/lib/yard/cli/command.rb +85 -0
- data/yard-0.9.44/lib/yard/cli/command_parser.rb +93 -0
- data/yard-0.9.44/lib/yard/cli/config.rb +198 -0
- data/yard-0.9.44/lib/yard/cli/diff.rb +278 -0
- data/yard-0.9.44/lib/yard/cli/display.rb +69 -0
- data/yard-0.9.44/lib/yard/cli/gems.rb +84 -0
- data/yard-0.9.44/lib/yard/cli/graph.rb +125 -0
- data/yard-0.9.44/lib/yard/cli/help.rb +20 -0
- data/yard-0.9.44/lib/yard/cli/i18n.rb +70 -0
- data/yard-0.9.44/lib/yard/cli/list.rb +23 -0
- data/yard-0.9.44/lib/yard/cli/markup_types.rb +32 -0
- data/yard-0.9.44/lib/yard/cli/server.rb +266 -0
- data/yard-0.9.44/lib/yard/cli/stats.rb +234 -0
- data/yard-0.9.44/lib/yard/cli/yardoc.rb +791 -0
- data/yard-0.9.44/lib/yard/cli/yardopts_command.rb +110 -0
- data/yard-0.9.44/lib/yard/cli/yri.rb +215 -0
- data/yard-0.9.44/lib/yard/code_objects/base.rb +626 -0
- data/yard-0.9.44/lib/yard/code_objects/class_object.rb +146 -0
- data/yard-0.9.44/lib/yard/code_objects/class_variable_object.rb +11 -0
- data/yard-0.9.44/lib/yard/code_objects/constant_object.rb +16 -0
- data/yard-0.9.44/lib/yard/code_objects/extended_method_object.rb +24 -0
- data/yard-0.9.44/lib/yard/code_objects/extra_file_object.rb +135 -0
- data/yard-0.9.44/lib/yard/code_objects/macro_object.rb +171 -0
- data/yard-0.9.44/lib/yard/code_objects/method_object.rb +196 -0
- data/yard-0.9.44/lib/yard/code_objects/module_object.rb +21 -0
- data/yard-0.9.44/lib/yard/code_objects/namespace_mapper.rb +141 -0
- data/yard-0.9.44/lib/yard/code_objects/namespace_object.rb +200 -0
- data/yard-0.9.44/lib/yard/code_objects/proxy.rb +245 -0
- data/yard-0.9.44/lib/yard/code_objects/root_object.rb +19 -0
- data/yard-0.9.44/lib/yard/config.rb +274 -0
- data/yard-0.9.44/lib/yard/core_ext/array.rb +16 -0
- data/yard-0.9.44/lib/yard/core_ext/file.rb +69 -0
- data/yard-0.9.44/lib/yard/core_ext/hash.rb +16 -0
- data/yard-0.9.44/lib/yard/core_ext/insertion.rb +63 -0
- data/yard-0.9.44/lib/yard/core_ext/module.rb +11 -0
- data/yard-0.9.44/lib/yard/core_ext/string.rb +68 -0
- data/yard-0.9.44/lib/yard/core_ext/symbol_hash.rb +75 -0
- data/yard-0.9.44/lib/yard/docstring.rb +386 -0
- data/yard-0.9.44/lib/yard/docstring_parser.rb +344 -0
- data/yard-0.9.44/lib/yard/gem_index.rb +29 -0
- data/yard-0.9.44/lib/yard/globals.rb +22 -0
- data/yard-0.9.44/lib/yard/handlers/base.rb +617 -0
- data/yard-0.9.44/lib/yard/handlers/c/alias_handler.rb +16 -0
- data/yard-0.9.44/lib/yard/handlers/c/attribute_handler.rb +13 -0
- data/yard-0.9.44/lib/yard/handlers/c/base.rb +164 -0
- data/yard-0.9.44/lib/yard/handlers/c/class_handler.rb +27 -0
- data/yard-0.9.44/lib/yard/handlers/c/constant_handler.rb +13 -0
- data/yard-0.9.44/lib/yard/handlers/c/handler_methods.rb +212 -0
- data/yard-0.9.44/lib/yard/handlers/c/init_handler.rb +20 -0
- data/yard-0.9.44/lib/yard/handlers/c/method_handler.rb +45 -0
- data/yard-0.9.44/lib/yard/handlers/c/mixin_handler.rb +21 -0
- data/yard-0.9.44/lib/yard/handlers/c/module_handler.rb +17 -0
- data/yard-0.9.44/lib/yard/handlers/c/override_comment_handler.rb +31 -0
- data/yard-0.9.44/lib/yard/handlers/c/path_handler.rb +11 -0
- data/yard-0.9.44/lib/yard/handlers/c/struct_handler.rb +13 -0
- data/yard-0.9.44/lib/yard/handlers/c/symbol_handler.rb +8 -0
- data/yard-0.9.44/lib/yard/handlers/common/method_handler.rb +19 -0
- data/yard-0.9.44/lib/yard/handlers/processor.rb +200 -0
- data/yard-0.9.44/lib/yard/handlers/rbs/attribute_handler.rb +79 -0
- data/yard-0.9.44/lib/yard/handlers/rbs/base.rb +38 -0
- data/yard-0.9.44/lib/yard/handlers/rbs/constant_handler.rb +18 -0
- data/yard-0.9.44/lib/yard/handlers/rbs/method_handler.rb +327 -0
- data/yard-0.9.44/lib/yard/handlers/rbs/mixin_handler.rb +20 -0
- data/yard-0.9.44/lib/yard/handlers/rbs/namespace_handler.rb +26 -0
- data/yard-0.9.44/lib/yard/handlers/ruby/alias_handler.rb +45 -0
- data/yard-0.9.44/lib/yard/handlers/ruby/attribute_handler.rb +90 -0
- data/yard-0.9.44/lib/yard/handlers/ruby/base.rb +165 -0
- data/yard-0.9.44/lib/yard/handlers/ruby/class_condition_handler.rb +92 -0
- data/yard-0.9.44/lib/yard/handlers/ruby/class_handler.rb +119 -0
- data/yard-0.9.44/lib/yard/handlers/ruby/class_variable_handler.rb +17 -0
- data/yard-0.9.44/lib/yard/handlers/ruby/comment_handler.rb +10 -0
- data/yard-0.9.44/lib/yard/handlers/ruby/constant_handler.rb +73 -0
- data/yard-0.9.44/lib/yard/handlers/ruby/decorator_handler_methods.rb +123 -0
- data/yard-0.9.44/lib/yard/handlers/ruby/dsl_handler.rb +15 -0
- data/yard-0.9.44/lib/yard/handlers/ruby/dsl_handler_methods.rb +96 -0
- data/yard-0.9.44/lib/yard/handlers/ruby/exception_handler.rb +27 -0
- data/yard-0.9.44/lib/yard/handlers/ruby/extend_handler.rb +22 -0
- data/yard-0.9.44/lib/yard/handlers/ruby/legacy/alias_handler.rb +37 -0
- data/yard-0.9.44/lib/yard/handlers/ruby/legacy/attribute_handler.rb +65 -0
- data/yard-0.9.44/lib/yard/handlers/ruby/legacy/base.rb +245 -0
- data/yard-0.9.44/lib/yard/handlers/ruby/legacy/class_condition_handler.rb +83 -0
- data/yard-0.9.44/lib/yard/handlers/ruby/legacy/class_handler.rb +113 -0
- data/yard-0.9.44/lib/yard/handlers/ruby/legacy/class_variable_handler.rb +15 -0
- data/yard-0.9.44/lib/yard/handlers/ruby/legacy/comment_handler.rb +10 -0
- data/yard-0.9.44/lib/yard/handlers/ruby/legacy/constant_handler.rb +29 -0
- data/yard-0.9.44/lib/yard/handlers/ruby/legacy/dsl_handler.rb +17 -0
- data/yard-0.9.44/lib/yard/handlers/ruby/legacy/exception_handler.rb +13 -0
- data/yard-0.9.44/lib/yard/handlers/ruby/legacy/extend_handler.rb +21 -0
- data/yard-0.9.44/lib/yard/handlers/ruby/legacy/method_handler.rb +90 -0
- data/yard-0.9.44/lib/yard/handlers/ruby/legacy/mixin_handler.rb +39 -0
- data/yard-0.9.44/lib/yard/handlers/ruby/legacy/module_function_handler.rb +19 -0
- data/yard-0.9.44/lib/yard/handlers/ruby/legacy/module_handler.rb +12 -0
- data/yard-0.9.44/lib/yard/handlers/ruby/legacy/private_class_method_handler.rb +22 -0
- data/yard-0.9.44/lib/yard/handlers/ruby/legacy/private_constant_handler.rb +22 -0
- data/yard-0.9.44/lib/yard/handlers/ruby/legacy/visibility_handler.rb +18 -0
- data/yard-0.9.44/lib/yard/handlers/ruby/legacy/yield_handler.rb +29 -0
- data/yard-0.9.44/lib/yard/handlers/ruby/method_condition_handler.rb +9 -0
- data/yard-0.9.44/lib/yard/handlers/ruby/method_handler.rb +104 -0
- data/yard-0.9.44/lib/yard/handlers/ruby/mixin_handler.rb +61 -0
- data/yard-0.9.44/lib/yard/handlers/ruby/module_function_handler.rb +39 -0
- data/yard-0.9.44/lib/yard/handlers/ruby/module_handler.rb +12 -0
- data/yard-0.9.44/lib/yard/handlers/ruby/private_class_method_handler.rb +14 -0
- data/yard-0.9.44/lib/yard/handlers/ruby/private_constant_handler.rb +43 -0
- data/yard-0.9.44/lib/yard/handlers/ruby/public_class_method_handler.rb +14 -0
- data/yard-0.9.44/lib/yard/handlers/ruby/struct_handler_methods.rb +143 -0
- data/yard-0.9.44/lib/yard/handlers/ruby/visibility_handler.rb +35 -0
- data/yard-0.9.44/lib/yard/handlers/ruby/yield_handler.rb +31 -0
- data/yard-0.9.44/lib/yard/i18n/locale.rb +67 -0
- data/yard-0.9.44/lib/yard/i18n/message.rb +57 -0
- data/yard-0.9.44/lib/yard/i18n/messages.rb +56 -0
- data/yard-0.9.44/lib/yard/i18n/po_parser.rb +61 -0
- data/yard-0.9.44/lib/yard/i18n/pot_generator.rb +290 -0
- data/yard-0.9.44/lib/yard/i18n/text.rb +173 -0
- data/yard-0.9.44/lib/yard/logging.rb +260 -0
- data/yard-0.9.44/lib/yard/open_struct.rb +67 -0
- data/yard-0.9.44/lib/yard/options.rb +217 -0
- data/yard-0.9.44/lib/yard/parser/base.rb +57 -0
- data/yard-0.9.44/lib/yard/parser/c/c_parser.rb +235 -0
- data/yard-0.9.44/lib/yard/parser/c/comment_parser.rb +134 -0
- data/yard-0.9.44/lib/yard/parser/c/statement.rb +66 -0
- data/yard-0.9.44/lib/yard/parser/rbs/rbs_parser.rb +325 -0
- data/yard-0.9.44/lib/yard/parser/rbs/statement.rb +75 -0
- data/yard-0.9.44/lib/yard/parser/ruby/ast_node.rb +559 -0
- data/yard-0.9.44/lib/yard/parser/ruby/legacy/irb/slex.rb +294 -0
- data/yard-0.9.44/lib/yard/parser/ruby/legacy/ruby_lex.rb +1360 -0
- data/yard-0.9.44/lib/yard/parser/ruby/legacy/ruby_parser.rb +32 -0
- data/yard-0.9.44/lib/yard/parser/ruby/legacy/statement.rb +68 -0
- data/yard-0.9.44/lib/yard/parser/ruby/legacy/statement_list.rb +394 -0
- data/yard-0.9.44/lib/yard/parser/ruby/legacy/token_list.rb +74 -0
- data/yard-0.9.44/lib/yard/parser/ruby/ruby_parser.rb +792 -0
- data/yard-0.9.44/lib/yard/parser/ruby/token_resolver.rb +158 -0
- data/yard-0.9.44/lib/yard/parser/source_parser.rb +526 -0
- data/yard-0.9.44/lib/yard/rake/yardoc_task.rb +81 -0
- data/yard-0.9.44/lib/yard/registry.rb +439 -0
- data/yard-0.9.44/lib/yard/registry_resolver.rb +225 -0
- data/yard-0.9.44/lib/yard/registry_store.rb +342 -0
- data/yard-0.9.44/lib/yard/rubygems/backports/LICENSE.txt +57 -0
- data/yard-0.9.44/lib/yard/rubygems/backports/MIT.txt +20 -0
- data/yard-0.9.44/lib/yard/rubygems/backports/gem.rb +10 -0
- data/yard-0.9.44/lib/yard/rubygems/backports/source_index.rb +365 -0
- data/yard-0.9.44/lib/yard/rubygems/backports.rb +10 -0
- data/yard-0.9.44/lib/yard/rubygems/doc_manager.rb +90 -0
- data/yard-0.9.44/lib/yard/rubygems/hook.rb +197 -0
- data/yard-0.9.44/lib/yard/rubygems/specification.rb +50 -0
- data/yard-0.9.44/lib/yard/serializers/base.rb +83 -0
- data/yard-0.9.44/lib/yard/serializers/file_system_serializer.rb +123 -0
- data/yard-0.9.44/lib/yard/serializers/process_serializer.rb +24 -0
- data/yard-0.9.44/lib/yard/serializers/stdout_serializer.rb +34 -0
- data/yard-0.9.44/lib/yard/serializers/yardoc_serializer.rb +152 -0
- data/yard-0.9.44/lib/yard/server/adapter.rb +100 -0
- data/yard-0.9.44/lib/yard/server/commands/base.rb +203 -0
- data/yard-0.9.44/lib/yard/server/commands/display_file_command.rb +29 -0
- data/yard-0.9.44/lib/yard/server/commands/display_object_command.rb +65 -0
- data/yard-0.9.44/lib/yard/server/commands/frames_command.rb +16 -0
- data/yard-0.9.44/lib/yard/server/commands/library_command.rb +187 -0
- data/yard-0.9.44/lib/yard/server/commands/library_index_command.rb +28 -0
- data/yard-0.9.44/lib/yard/server/commands/list_command.rb +25 -0
- data/yard-0.9.44/lib/yard/server/commands/root_request_command.rb +15 -0
- data/yard-0.9.44/lib/yard/server/commands/search_command.rb +79 -0
- data/yard-0.9.44/lib/yard/server/commands/static_file_command.rb +23 -0
- data/yard-0.9.44/lib/yard/server/commands/static_file_helpers.rb +60 -0
- data/yard-0.9.44/lib/yard/server/doc_server_helper.rb +91 -0
- data/yard-0.9.44/lib/yard/server/doc_server_serializer.rb +39 -0
- data/yard-0.9.44/lib/yard/server/http_utils.rb +512 -0
- data/yard-0.9.44/lib/yard/server/library_version.rb +277 -0
- data/yard-0.9.44/lib/yard/server/rack_adapter.rb +97 -0
- data/yard-0.9.44/lib/yard/server/router.rb +187 -0
- data/yard-0.9.44/lib/yard/server/static_caching.rb +77 -0
- data/yard-0.9.44/lib/yard/server/templates/default/fulldoc/html/css/custom.css +207 -0
- data/yard-0.9.44/lib/yard/server/templates/default/fulldoc/html/images/processing.gif +0 -0
- data/yard-0.9.44/lib/yard/server/templates/default/fulldoc/html/js/autocomplete.js +203 -0
- data/yard-0.9.44/lib/yard/server/templates/default/layout/html/breadcrumb.erb +21 -0
- data/yard-0.9.44/lib/yard/server/templates/default/layout/html/script_setup.erb +7 -0
- data/yard-0.9.44/lib/yard/server/templates/default/layout/html/setup.rb +8 -0
- data/yard-0.9.44/lib/yard/server/templates/default/method_details/html/permalink.erb +6 -0
- data/yard-0.9.44/lib/yard/server/templates/default/method_details/html/setup.rb +5 -0
- data/yard-0.9.44/lib/yard/server/templates/doc_server/library_list/html/headers.erb +8 -0
- data/yard-0.9.44/lib/yard/server/templates/doc_server/library_list/html/library_list.erb +13 -0
- data/yard-0.9.44/lib/yard/server/templates/doc_server/library_list/html/listing.erb +13 -0
- data/yard-0.9.44/lib/yard/server/templates/doc_server/library_list/html/setup.rb +6 -0
- data/yard-0.9.44/lib/yard/server/templates/doc_server/library_list/html/title.erb +2 -0
- data/yard-0.9.44/lib/yard/server/templates/doc_server/processing/html/processing.erb +58 -0
- data/yard-0.9.44/lib/yard/server/templates/doc_server/processing/html/setup.rb +4 -0
- data/yard-0.9.44/lib/yard/server/templates/doc_server/search/html/search.erb +18 -0
- data/yard-0.9.44/lib/yard/server/templates/doc_server/search/html/setup.rb +9 -0
- data/yard-0.9.44/lib/yard/server/webrick_adapter.rb +45 -0
- data/yard-0.9.44/lib/yard/server.rb +13 -0
- data/yard-0.9.44/lib/yard/tags/default_factory.rb +192 -0
- data/yard-0.9.44/lib/yard/tags/default_tag.rb +13 -0
- data/yard-0.9.44/lib/yard/tags/directives.rb +631 -0
- data/yard-0.9.44/lib/yard/tags/library.rb +633 -0
- data/yard-0.9.44/lib/yard/tags/option_tag.rb +13 -0
- data/yard-0.9.44/lib/yard/tags/overload_tag.rb +72 -0
- data/yard-0.9.44/lib/yard/tags/ref_tag.rb +8 -0
- data/yard-0.9.44/lib/yard/tags/ref_tag_list.rb +28 -0
- data/yard-0.9.44/lib/yard/tags/tag.rb +72 -0
- data/yard-0.9.44/lib/yard/tags/tag_format_error.rb +7 -0
- data/yard-0.9.44/lib/yard/tags/types_explainer.rb +288 -0
- data/yard-0.9.44/lib/yard/templates/engine.rb +185 -0
- data/yard-0.9.44/lib/yard/templates/erb_cache.rb +23 -0
- data/yard-0.9.44/lib/yard/templates/helpers/base_helper.rb +215 -0
- data/yard-0.9.44/lib/yard/templates/helpers/filter_helper.rb +27 -0
- data/yard-0.9.44/lib/yard/templates/helpers/html_helper.rb +688 -0
- data/yard-0.9.44/lib/yard/templates/helpers/html_syntax_highlight_helper.rb +83 -0
- data/yard-0.9.44/lib/yard/templates/helpers/markup/html_entities.rb +2140 -0
- data/yard-0.9.44/lib/yard/templates/helpers/markup/hybrid_markdown.rb +2131 -0
- data/yard-0.9.44/lib/yard/templates/helpers/markup/rdoc_markdown.rb +23 -0
- data/yard-0.9.44/lib/yard/templates/helpers/markup/rdoc_markup.rb +112 -0
- data/yard-0.9.44/lib/yard/templates/helpers/markup_helper.rb +175 -0
- data/yard-0.9.44/lib/yard/templates/helpers/method_helper.rb +77 -0
- data/yard-0.9.44/lib/yard/templates/helpers/module_helper.rb +21 -0
- data/yard-0.9.44/lib/yard/templates/helpers/text_helper.rb +112 -0
- data/yard-0.9.44/lib/yard/templates/helpers/uml_helper.rb +47 -0
- data/yard-0.9.44/lib/yard/templates/section.rb +103 -0
- data/yard-0.9.44/lib/yard/templates/template.rb +420 -0
- data/yard-0.9.44/lib/yard/templates/template_options.rb +91 -0
- data/yard-0.9.44/lib/yard/verifier.rb +151 -0
- data/yard-0.9.44/lib/yard/version.rb +6 -0
- data/yard-0.9.44/lib/yard.rb +75 -0
- data/yard-0.9.44/po/ja.po +31108 -0
- data/yard-0.9.44/templates/default/class/dot/setup.rb +7 -0
- data/yard-0.9.44/templates/default/class/dot/superklass.erb +3 -0
- data/yard-0.9.44/templates/default/class/html/constructor_details.erb +8 -0
- data/yard-0.9.44/templates/default/class/html/setup.rb +2 -0
- data/yard-0.9.44/templates/default/class/html/subclasses.erb +4 -0
- data/yard-0.9.44/templates/default/class/setup.rb +36 -0
- data/yard-0.9.44/templates/default/class/text/setup.rb +12 -0
- data/yard-0.9.44/templates/default/class/text/subclasses.erb +5 -0
- data/yard-0.9.44/templates/default/constant/text/header.erb +11 -0
- data/yard-0.9.44/templates/default/constant/text/setup.rb +4 -0
- data/yard-0.9.44/templates/default/docstring/html/abstract.erb +4 -0
- data/yard-0.9.44/templates/default/docstring/html/deprecated.erb +1 -0
- data/yard-0.9.44/templates/default/docstring/html/index.erb +5 -0
- data/yard-0.9.44/templates/default/docstring/html/note.erb +6 -0
- data/yard-0.9.44/templates/default/docstring/html/private.erb +4 -0
- data/yard-0.9.44/templates/default/docstring/html/returns_void.erb +1 -0
- data/yard-0.9.44/templates/default/docstring/html/text.erb +1 -0
- data/yard-0.9.44/templates/default/docstring/html/todo.erb +6 -0
- data/yard-0.9.44/templates/default/docstring/setup.rb +52 -0
- data/yard-0.9.44/templates/default/docstring/text/abstract.erb +2 -0
- data/yard-0.9.44/templates/default/docstring/text/deprecated.erb +2 -0
- data/yard-0.9.44/templates/default/docstring/text/index.erb +2 -0
- data/yard-0.9.44/templates/default/docstring/text/note.erb +4 -0
- data/yard-0.9.44/templates/default/docstring/text/private.erb +2 -0
- data/yard-0.9.44/templates/default/docstring/text/returns_void.erb +1 -0
- data/yard-0.9.44/templates/default/docstring/text/text.erb +1 -0
- data/yard-0.9.44/templates/default/docstring/text/todo.erb +4 -0
- data/yard-0.9.44/templates/default/fulldoc/html/css/common.css +1 -0
- data/yard-0.9.44/templates/default/fulldoc/html/css/full_list.css +206 -0
- data/yard-0.9.44/templates/default/fulldoc/html/css/style.css +1089 -0
- data/yard-0.9.44/templates/default/fulldoc/html/frames.erb +22 -0
- data/yard-0.9.44/templates/default/fulldoc/html/full_list.erb +40 -0
- data/yard-0.9.44/templates/default/fulldoc/html/full_list_class.erb +2 -0
- data/yard-0.9.44/templates/default/fulldoc/html/full_list_file.erb +7 -0
- data/yard-0.9.44/templates/default/fulldoc/html/full_list_method.erb +10 -0
- data/yard-0.9.44/templates/default/fulldoc/html/js/app.js +801 -0
- data/yard-0.9.44/templates/default/fulldoc/html/js/full_list.js +334 -0
- data/yard-0.9.44/templates/default/fulldoc/html/js/jquery.js +4 -0
- data/yard-0.9.44/templates/default/fulldoc/html/setup.rb +249 -0
- data/yard-0.9.44/templates/default/layout/dot/header.erb +6 -0
- data/yard-0.9.44/templates/default/layout/dot/setup.rb +15 -0
- data/yard-0.9.44/templates/default/layout/html/breadcrumb.erb +11 -0
- data/yard-0.9.44/templates/default/layout/html/files.erb +11 -0
- data/yard-0.9.44/templates/default/layout/html/footer.erb +5 -0
- data/yard-0.9.44/templates/default/layout/html/headers.erb +15 -0
- data/yard-0.9.44/templates/default/layout/html/index.erb +2 -0
- data/yard-0.9.44/templates/default/layout/html/layout.erb +26 -0
- data/yard-0.9.44/templates/default/layout/html/listing.erb +4 -0
- data/yard-0.9.44/templates/default/layout/html/objects.erb +32 -0
- data/yard-0.9.44/templates/default/layout/html/script_setup.erb +4 -0
- data/yard-0.9.44/templates/default/layout/html/search.erb +13 -0
- data/yard-0.9.44/templates/default/layout/html/setup.rb +89 -0
- data/yard-0.9.44/templates/default/method/html/header.erb +17 -0
- data/yard-0.9.44/templates/default/method/setup.rb +4 -0
- data/yard-0.9.44/templates/default/method/text/header.erb +1 -0
- data/yard-0.9.44/templates/default/method_details/html/header.erb +3 -0
- data/yard-0.9.44/templates/default/method_details/html/method_signature.erb +25 -0
- data/yard-0.9.44/templates/default/method_details/html/source.erb +10 -0
- data/yard-0.9.44/templates/default/method_details/setup.rb +11 -0
- data/yard-0.9.44/templates/default/method_details/text/header.erb +10 -0
- data/yard-0.9.44/templates/default/method_details/text/method_signature.erb +12 -0
- data/yard-0.9.44/templates/default/method_details/text/setup.rb +11 -0
- data/yard-0.9.44/templates/default/module/dot/child.erb +1 -0
- data/yard-0.9.44/templates/default/module/dot/dependencies.erb +3 -0
- data/yard-0.9.44/templates/default/module/dot/header.erb +6 -0
- data/yard-0.9.44/templates/default/module/dot/info.erb +14 -0
- data/yard-0.9.44/templates/default/module/dot/setup.rb +15 -0
- data/yard-0.9.44/templates/default/module/html/attribute_details.erb +10 -0
- data/yard-0.9.44/templates/default/module/html/attribute_summary.erb +8 -0
- data/yard-0.9.44/templates/default/module/html/box_info.erb +43 -0
- data/yard-0.9.44/templates/default/module/html/children.erb +8 -0
- data/yard-0.9.44/templates/default/module/html/constant_summary.erb +17 -0
- data/yard-0.9.44/templates/default/module/html/defines.erb +3 -0
- data/yard-0.9.44/templates/default/module/html/header.erb +5 -0
- data/yard-0.9.44/templates/default/module/html/inherited_attributes.erb +14 -0
- data/yard-0.9.44/templates/default/module/html/inherited_constants.erb +8 -0
- data/yard-0.9.44/templates/default/module/html/inherited_methods.erb +20 -0
- data/yard-0.9.44/templates/default/module/html/item_summary.erb +40 -0
- data/yard-0.9.44/templates/default/module/html/method_details_list.erb +9 -0
- data/yard-0.9.44/templates/default/module/html/method_summary.erb +22 -0
- data/yard-0.9.44/templates/default/module/html/methodmissing.erb +12 -0
- data/yard-0.9.44/templates/default/module/html/pre_docstring.erb +1 -0
- data/yard-0.9.44/templates/default/module/setup.rb +187 -0
- data/yard-0.9.44/templates/default/module/text/children.erb +10 -0
- data/yard-0.9.44/templates/default/module/text/class_meths_list.erb +8 -0
- data/yard-0.9.44/templates/default/module/text/extends.erb +8 -0
- data/yard-0.9.44/templates/default/module/text/header.erb +7 -0
- data/yard-0.9.44/templates/default/module/text/includes.erb +8 -0
- data/yard-0.9.44/templates/default/module/text/instance_meths_list.erb +8 -0
- data/yard-0.9.44/templates/default/module/text/setup.rb +13 -0
- data/yard-0.9.44/templates/default/onefile/html/files.erb +5 -0
- data/yard-0.9.44/templates/default/onefile/html/headers.erb +8 -0
- data/yard-0.9.44/templates/default/onefile/html/layout.erb +16 -0
- data/yard-0.9.44/templates/default/onefile/html/readme.erb +3 -0
- data/yard-0.9.44/templates/default/onefile/html/setup.rb +62 -0
- data/yard-0.9.44/templates/default/root/dot/child.erb +3 -0
- data/yard-0.9.44/templates/default/root/dot/setup.rb +6 -0
- data/yard-0.9.44/templates/default/root/html/setup.rb +2 -0
- data/yard-0.9.44/templates/default/tags/html/example.erb +11 -0
- data/yard-0.9.44/templates/default/tags/html/index.erb +3 -0
- data/yard-0.9.44/templates/default/tags/html/option.erb +24 -0
- data/yard-0.9.44/templates/default/tags/html/overload.erb +14 -0
- data/yard-0.9.44/templates/default/tags/html/see.erb +8 -0
- data/yard-0.9.44/templates/default/tags/html/tag.erb +20 -0
- data/yard-0.9.44/templates/default/tags/setup.rb +57 -0
- data/yard-0.9.44/templates/default/tags/text/example.erb +12 -0
- data/yard-0.9.44/templates/default/tags/text/index.erb +1 -0
- data/yard-0.9.44/templates/default/tags/text/option.erb +20 -0
- data/yard-0.9.44/templates/default/tags/text/overload.erb +19 -0
- data/yard-0.9.44/templates/default/tags/text/see.erb +11 -0
- data/yard-0.9.44/templates/default/tags/text/tag.erb +13 -0
- data/yard-0.9.44/templates/guide/class/html/setup.rb +2 -0
- data/yard-0.9.44/templates/guide/docstring/html/setup.rb +2 -0
- data/yard-0.9.44/templates/guide/fulldoc/html/css/style.css +358 -0
- data/yard-0.9.44/templates/guide/fulldoc/html/js/app.js +61 -0
- data/yard-0.9.44/templates/guide/fulldoc/html/setup.rb +74 -0
- data/yard-0.9.44/templates/guide/layout/html/layout.erb +78 -0
- data/yard-0.9.44/templates/guide/layout/html/setup.rb +25 -0
- data/yard-0.9.44/templates/guide/method/html/header.erb +18 -0
- data/yard-0.9.44/templates/guide/method/html/setup.rb +22 -0
- data/yard-0.9.44/templates/guide/module/html/header.erb +7 -0
- data/yard-0.9.44/templates/guide/module/html/method_list.erb +5 -0
- data/yard-0.9.44/templates/guide/module/html/setup.rb +27 -0
- data/yard-0.9.44/templates/guide/onefile/html/files.erb +4 -0
- data/yard-0.9.44/templates/guide/onefile/html/setup.rb +6 -0
- data/yard-0.9.44/templates/guide/onefile/html/toc.erb +3 -0
- data/yard-0.9.44/templates/guide/tags/html/setup.rb +9 -0
- metadata +419 -0
data/yard-0.9.44/LEGAL
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
LEGAL NOTICE INFORMATION
|
|
2
|
+
------------------------
|
|
3
|
+
|
|
4
|
+
All the files in this distribution are covered under either the MIT
|
|
5
|
+
license (see the file LICENSE) except some files mentioned below.
|
|
6
|
+
|
|
7
|
+
lib/yard/parser/ruby/legacy/ruby_lex.rb:
|
|
8
|
+
|
|
9
|
+
This file is under the Ruby license. YARD uses a modified version of it.
|
|
10
|
+
|
|
11
|
+
Ruby is copyrighted free software by Yukihiro Matsumoto <matz@netlab.jp>.
|
|
12
|
+
You can redistribute it and/or modify it under either the terms of the GPL
|
|
13
|
+
version 2 (see the file GPL), or the conditions below:
|
|
14
|
+
|
|
15
|
+
1. You may make and give away verbatim copies of the source form of the
|
|
16
|
+
software without restriction, provided that you duplicate all of the
|
|
17
|
+
original copyright notices and associated disclaimers.
|
|
18
|
+
|
|
19
|
+
2. You may modify your copy of the software in any way, provided that
|
|
20
|
+
you do at least ONE of the following:
|
|
21
|
+
|
|
22
|
+
a) place your modifications in the Public Domain or otherwise
|
|
23
|
+
make them Freely Available, such as by posting said
|
|
24
|
+
modifications to Usenet or an equivalent medium, or by allowing
|
|
25
|
+
the author to include your modifications in the software.
|
|
26
|
+
|
|
27
|
+
b) use the modified software only within your corporation or
|
|
28
|
+
organization.
|
|
29
|
+
|
|
30
|
+
c) give non-standard binaries non-standard names, with
|
|
31
|
+
instructions on where to get the original software distribution.
|
|
32
|
+
|
|
33
|
+
d) make other distribution arrangements with the author.
|
|
34
|
+
|
|
35
|
+
3. You may distribute the software in object code or binary form,
|
|
36
|
+
provided that you do at least ONE of the following:
|
|
37
|
+
|
|
38
|
+
a) distribute the binaries and library files of the software,
|
|
39
|
+
together with instructions (in the manual page or equivalent)
|
|
40
|
+
on where to get the original distribution.
|
|
41
|
+
|
|
42
|
+
b) accompany the distribution with the machine-readable source of
|
|
43
|
+
the software.
|
|
44
|
+
|
|
45
|
+
c) give non-standard binaries non-standard names, with
|
|
46
|
+
instructions on where to get the original software distribution.
|
|
47
|
+
|
|
48
|
+
d) make other distribution arrangements with the author.
|
|
49
|
+
|
|
50
|
+
4. You may modify and include the part of the software into any other
|
|
51
|
+
software (possibly commercial). But some files in the distribution
|
|
52
|
+
are not written by the author, so that they are not under these terms.
|
|
53
|
+
|
|
54
|
+
For the list of those files and their copying conditions, see the
|
|
55
|
+
file LEGAL.
|
|
56
|
+
|
|
57
|
+
5. The scripts and library files supplied as input to or produced as
|
|
58
|
+
output from the software do not automatically fall under the
|
|
59
|
+
copyright of the software, but belong to whomever generated them,
|
|
60
|
+
and may be sold commercially, and may be aggregated with this
|
|
61
|
+
software.
|
|
62
|
+
|
|
63
|
+
6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
|
|
64
|
+
IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
|
65
|
+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
66
|
+
PURPOSE.
|
|
67
|
+
|
|
68
|
+
lib/yard/server/http_utils.rb:
|
|
69
|
+
|
|
70
|
+
This file is vendored and slightly modified from WEBrick because it was
|
|
71
|
+
removed from Ruby core in Ruby 3.x.
|
|
72
|
+
|
|
73
|
+
Copyright (C) 1993-2013 Yukihiro Matsumoto. All rights reserved.
|
|
74
|
+
|
|
75
|
+
Redistribution and use in source and binary forms, with or without
|
|
76
|
+
modification, are permitted provided that the following conditions
|
|
77
|
+
are met:
|
|
78
|
+
1. Redistributions of source code must retain the above copyright
|
|
79
|
+
notice, this list of conditions and the following disclaimer.
|
|
80
|
+
2. Redistributions in binary form must reproduce the above copyright
|
|
81
|
+
notice, this list of conditions and the following disclaimer in the
|
|
82
|
+
documentation and/or other materials provided with the distribution.
|
|
83
|
+
|
|
84
|
+
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
|
85
|
+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
86
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
87
|
+
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
|
88
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
89
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
90
|
+
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
91
|
+
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
92
|
+
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
93
|
+
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
94
|
+
SUCH DAMAGE.
|
data/yard-0.9.44/LICENSE
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
Copyright (c) 2007-2026 Loren Segal
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person
|
|
4
|
+
obtaining a copy of this software and associated documentation
|
|
5
|
+
files (the "Software"), to deal in the Software without
|
|
6
|
+
restriction, including without limitation the rights to use,
|
|
7
|
+
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
8
|
+
copies of the Software, and to permit persons to whom the
|
|
9
|
+
Software is furnished to do so, subject to the following
|
|
10
|
+
conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be
|
|
13
|
+
included in all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
16
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
|
17
|
+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
18
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
19
|
+
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
20
|
+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
21
|
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
22
|
+
OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -0,0 +1,329 @@
|
|
|
1
|
+
# YARD: Yay! A Ruby Documentation Tool
|
|
2
|
+
|
|
3
|
+
[](https://yardoc.org)
|
|
4
|
+
[](https://github.com/lsegal/yard)
|
|
5
|
+
[](https://rubydoc.org/gems/yard/frames)
|
|
6
|
+
|
|
7
|
+
[](https://github.com/lsegal/yard/releases)
|
|
8
|
+
[](https://github.com/lsegal/yard/actions/workflows/ci.yml)
|
|
9
|
+
[](https://coveralls.io/github/lsegal/yard)
|
|
10
|
+
[](#license)
|
|
11
|
+
|
|
12
|
+
## Synopsis
|
|
13
|
+
|
|
14
|
+
YARD is a documentation generation tool for the Ruby programming language. It
|
|
15
|
+
enables the user to generate consistent, usable documentation that can be
|
|
16
|
+
exported to a number of formats very easily, and also supports extending for
|
|
17
|
+
custom Ruby constructs such as custom class level definitions. Below is a
|
|
18
|
+
summary of some of YARD's notable features.
|
|
19
|
+
|
|
20
|
+
## Feature List
|
|
21
|
+
|
|
22
|
+
**1. Builtin RDoc/Markdown Hybrid Support**: YARD ships with a builtin markup
|
|
23
|
+
renderer that supports both RDoc and Markdown formatting out of the box—no
|
|
24
|
+
external gem required. You can freely mix RDoc-style and Markdown-style
|
|
25
|
+
documentation without installing any additional libraries.
|
|
26
|
+
|
|
27
|
+
**2. Yardoc Meta-tag Formatting Like Python, Java, Objective-C and other
|
|
28
|
+
languages**: YARD uses a '@tag' style definition syntax for meta tags alongside
|
|
29
|
+
regular code documentation. These tags should be able to happily sit side by
|
|
30
|
+
side RDoc formatted documentation, but provide a much more consistent and usable
|
|
31
|
+
way to describe important information about objects, such as what parameters
|
|
32
|
+
they take and what types they are expected to be, what type a method should
|
|
33
|
+
return, what exceptions it can raise, if it is deprecated, etc.. It also allows
|
|
34
|
+
information to be better (and more consistently) organized during the output
|
|
35
|
+
generation phase. You can find a list of tags in the {file:docs/Tags.md#taglist
|
|
36
|
+
Tags.md} file.
|
|
37
|
+
|
|
38
|
+
YARD also supports an optional "types" declarations for certain tags. This
|
|
39
|
+
allows the developer to document type signatures for ruby methods and parameters
|
|
40
|
+
in a non intrusive but helpful and consistent manner. Instead of describing this
|
|
41
|
+
data in the body of the description, a developer may formally declare the
|
|
42
|
+
parameter or return type(s) in a single line. Consider the following method
|
|
43
|
+
documented with YARD formatting:
|
|
44
|
+
|
|
45
|
+
```ruby
|
|
46
|
+
# Reverses the contents of a String or IO object.
|
|
47
|
+
#
|
|
48
|
+
# @param contents [String, #read] the contents to reverse
|
|
49
|
+
# @return [String] the contents reversed lexically
|
|
50
|
+
def reverse(contents)
|
|
51
|
+
contents = contents.read if contents.respond_to? :read
|
|
52
|
+
contents.reverse
|
|
53
|
+
end
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
With the above @param tag, we learn that the contents parameter can either be a
|
|
57
|
+
String or any object that responds to the 'read' method, which is more powerful
|
|
58
|
+
than the textual description, which says it should be an IO object. This also
|
|
59
|
+
informs the developer that they should expect to receive a String object
|
|
60
|
+
returned by the method, and although this may be obvious for a 'reverse' method,
|
|
61
|
+
it becomes very useful when the method name may not be as descriptive.
|
|
62
|
+
|
|
63
|
+
**3. Custom Constructs and Extensibility of YARD**: YARD is designed to be
|
|
64
|
+
extended and customized by plugins. Take for instance the scenario where you
|
|
65
|
+
need to document the following code:
|
|
66
|
+
|
|
67
|
+
```ruby
|
|
68
|
+
class List
|
|
69
|
+
# Sets the publisher name for the list.
|
|
70
|
+
cattr_accessor :publisher
|
|
71
|
+
end
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
This custom declaration provides dynamically generated code that is hard for a
|
|
75
|
+
documentation tool to properly document without help from the developer. To ease
|
|
76
|
+
the pains of manually documenting the procedure, YARD can be extended by the
|
|
77
|
+
developer to handle the `cattr_accessor` construct and automatically create an
|
|
78
|
+
attribute on the class with the associated documentation. This makes documenting
|
|
79
|
+
external API's, especially dynamic ones, a lot more consistent for consumption
|
|
80
|
+
by the users.
|
|
81
|
+
|
|
82
|
+
YARD is also designed for extensibility everywhere else, allowing you to add
|
|
83
|
+
support for new programming languages, new data structures and even where/how
|
|
84
|
+
data is stored.
|
|
85
|
+
|
|
86
|
+
**4. Raw Data Output**: YARD also outputs documented objects as raw data (the
|
|
87
|
+
dumped Namespace) which can be reloaded to do generation at a later date, or
|
|
88
|
+
even auditing on code. This means that any developer can use the raw data to
|
|
89
|
+
perform output generation for any custom format, such as YAML, for instance.
|
|
90
|
+
While YARD plans to support XHTML style documentation output as well as command
|
|
91
|
+
line (text based) and possibly XML, this may still be useful for those who would
|
|
92
|
+
like to reap the benefits of YARD's processing in other forms, such as throwing
|
|
93
|
+
all the documentation into a database. Another useful way of exploiting this raw
|
|
94
|
+
data format would be to write tools that can auto generate test cases, for
|
|
95
|
+
example, or show possible unhandled exceptions in code.
|
|
96
|
+
|
|
97
|
+
**5. Local Documentation Server**: YARD can serve documentation for projects or
|
|
98
|
+
installed gems (similar to `gem server`) with the added benefit of dynamic
|
|
99
|
+
searching, as well as live reloading. Using the live reload feature, you can
|
|
100
|
+
document your code and immediately preview the results by refreshing the page;
|
|
101
|
+
YARD will do all the work in re-generating the HTML. This makes writing
|
|
102
|
+
documentation a much faster process.
|
|
103
|
+
|
|
104
|
+
## Installing
|
|
105
|
+
|
|
106
|
+
To install YARD, use the following command:
|
|
107
|
+
|
|
108
|
+
```sh
|
|
109
|
+
$ gem install yard
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
(Add `sudo` if you're installing under a POSIX system as root)
|
|
113
|
+
|
|
114
|
+
Alternatively, if you've checked the source out directly, you can call
|
|
115
|
+
`rake install` from the root project directory.
|
|
116
|
+
|
|
117
|
+
### Markup rendering
|
|
118
|
+
|
|
119
|
+
YARD includes a builtin renderer that handles both RDoc and Markdown markup
|
|
120
|
+
types without any external dependencies. To switch the default markup type,
|
|
121
|
+
pass `-m markdown` (or `-m rdoc`) to `yard doc`, or add it to your `.yardopts`
|
|
122
|
+
file.
|
|
123
|
+
|
|
124
|
+
For optional extra rendering features (e.g. GitHub-Flavoured Markdown fenced
|
|
125
|
+
code blocks, tables, or specific Markdown extensions), you can install an
|
|
126
|
+
additional provider gem such as `redcarpet`, `commonmarker`, or `kramdown` and
|
|
127
|
+
select it explicitly with `-M PROVIDER` (e.g. `yard doc -m markdown -M redcarpet`).
|
|
128
|
+
|
|
129
|
+
## Usage
|
|
130
|
+
|
|
131
|
+
There are a couple of ways to use YARD. The first is via command-line, and the
|
|
132
|
+
second is the Rake task.
|
|
133
|
+
|
|
134
|
+
### 1. yard Command-line Tool
|
|
135
|
+
|
|
136
|
+
YARD comes packaged with a executable named `yard` which can control the many
|
|
137
|
+
functions of YARD, including generating documentation, graphs running the YARD
|
|
138
|
+
server, and so on. To view a list of available YARD commands, type:
|
|
139
|
+
|
|
140
|
+
```sh
|
|
141
|
+
$ yard --help
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
Plugins can also add commands to the `yard` executable to provide extra
|
|
145
|
+
functionality.
|
|
146
|
+
|
|
147
|
+
#### Generating Documentation
|
|
148
|
+
|
|
149
|
+
<span class="note">The `yardoc` executable is a shortcut for `yard doc`.</span>
|
|
150
|
+
|
|
151
|
+
The most common command you will probably use is `yard doc`, or `yardoc`. You
|
|
152
|
+
can type `yardoc --help` to see the options that YARD provides, but the easiest
|
|
153
|
+
way to generate docs for your code is to simply type `yardoc` in your project
|
|
154
|
+
root. This will assume your files are located in the `lib/` directory. If they
|
|
155
|
+
are located elsewhere, you can specify paths and globs from the commandline via:
|
|
156
|
+
|
|
157
|
+
```sh
|
|
158
|
+
$ yardoc 'lib/**/*.rb' 'app/**/*.rb' ...etc...
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
The tool will generate a `.yardoc` file which will store the cached database of
|
|
162
|
+
your source code and documentation. If you want to re-generate your docs with
|
|
163
|
+
another template you can simply use the `--use-cache` (or -c) option to speed up
|
|
164
|
+
the generation process by skipping source parsing.
|
|
165
|
+
|
|
166
|
+
YARD will by default only document code in your public visibility. You can
|
|
167
|
+
document your protected and private code by adding `--protected` or `--private`
|
|
168
|
+
to the option switches. In addition, you can add `--no-private` to also ignore
|
|
169
|
+
any object that has the `@private` meta-tag. This is similar to RDoc's ":nodoc:"
|
|
170
|
+
behaviour, though the distinction is important. RDoc implies that the object
|
|
171
|
+
with :nodoc: would not be documented, whereas YARD still recommends documenting
|
|
172
|
+
private objects for the private API (for maintainer/developer consumption).
|
|
173
|
+
|
|
174
|
+
You can also add extra informative files (README, LICENSE) by separating the
|
|
175
|
+
globs and the filenames with '-'.
|
|
176
|
+
|
|
177
|
+
```sh
|
|
178
|
+
$ yardoc 'app/**/*.rb' - README LICENSE FAQ
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
If no globs precede the '-' argument, the default glob (`lib/**/*.rb`) is used:
|
|
182
|
+
|
|
183
|
+
```sh
|
|
184
|
+
$ yardoc - README LICENSE FAQ
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
Note that the README file can be specified with its own `--readme` switch.
|
|
188
|
+
|
|
189
|
+
You can also add a `.yardopts` file to your project directory which lists the
|
|
190
|
+
switches separated by whitespace (newlines or space) to pass to yardoc whenever
|
|
191
|
+
it is run. A full overview of the `.yardopts` file can be found in
|
|
192
|
+
[YARD::CLI::Yardoc](https://rubydoc.info/gems/yard/YARD/CLI/Yardoc#label-Options+File+-28.yardopts-29).
|
|
193
|
+
|
|
194
|
+
#### Queries
|
|
195
|
+
|
|
196
|
+
The `yardoc` tool also supports a `--query` argument to only include objects
|
|
197
|
+
that match a certain data or meta-data query. The query syntax is Ruby, though a
|
|
198
|
+
few shortcuts are available. For instance, to document only objects that have an
|
|
199
|
+
"@api" tag with the value "public", all of the following syntaxes would give the
|
|
200
|
+
same result:
|
|
201
|
+
|
|
202
|
+
```sh
|
|
203
|
+
--query '@api.text == "public"'
|
|
204
|
+
--query 'object.has_tag?(:api) && object.tag(:api).text == "public"'
|
|
205
|
+
--query 'has_tag?(:api) && tag(:api).text == "public"'
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
Note that the "@tag" syntax returns the first tag named "tag" on the object. To
|
|
209
|
+
return the array of all tags named "tag", use "@@tag".
|
|
210
|
+
|
|
211
|
+
Multiple `--query` arguments are allowed in the command line parameters. The
|
|
212
|
+
following two lines both check for the existence of a return and param tag:
|
|
213
|
+
|
|
214
|
+
```sh
|
|
215
|
+
--query '@return' --query '@param'
|
|
216
|
+
--query '@return && @param'
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
For more information about the query syntax, see the {YARD::Verifier} class.
|
|
220
|
+
|
|
221
|
+
### 2. Rake Task
|
|
222
|
+
|
|
223
|
+
The second most obvious is to generate docs via a Rake task. You can do this by
|
|
224
|
+
adding the following to your `Rakefile`:
|
|
225
|
+
|
|
226
|
+
```ruby
|
|
227
|
+
require 'yard'
|
|
228
|
+
|
|
229
|
+
YARD::Rake::YardocTask.new do |t|
|
|
230
|
+
t.files = ['lib/**/*.rb', OTHER_PATHS] # optional
|
|
231
|
+
t.options = ['--any', '--extra', '--opts'] # optional
|
|
232
|
+
t.stats_options = ['--list-undoc'] # optional
|
|
233
|
+
end
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
All the settings: `files`, `options` and `stats_options` are optional. `files`
|
|
237
|
+
will default to `lib/**/*.rb`, `options` will represents any options you might
|
|
238
|
+
want to add and `stats_options` will pass extra options to the stats command.
|
|
239
|
+
Again, a full list of options is available by typing `yardoc --help` in a shell.
|
|
240
|
+
You can also override the options at the Rake command-line with the OPTS
|
|
241
|
+
environment variable:
|
|
242
|
+
|
|
243
|
+
```sh
|
|
244
|
+
$ rake yard OPTS='--any --extra --opts'
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
### 3. `yri` RI Implementation
|
|
248
|
+
|
|
249
|
+
The yri binary will use the cached .yardoc database to give you quick ri-style
|
|
250
|
+
access to your documentation. It's way faster than ri but currently does not
|
|
251
|
+
work with the stdlib or core Ruby libraries, only the active project. Example:
|
|
252
|
+
|
|
253
|
+
```sh
|
|
254
|
+
$ yri YARD::Handlers::Base#register
|
|
255
|
+
$ yri File.relative_path
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
Note that class methods must not be referred to with the "::" namespace
|
|
259
|
+
separator. Only modules, classes and constants should use "::".
|
|
260
|
+
|
|
261
|
+
You can also do lookups on any installed gems. Just make sure to build the
|
|
262
|
+
.yardoc databases for installed gems with:
|
|
263
|
+
|
|
264
|
+
```sh
|
|
265
|
+
$ yard gems
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
If you don't have sudo access, it will write these files to your `~/.yard`
|
|
269
|
+
directory. `yri` will also cache lookups there.
|
|
270
|
+
|
|
271
|
+
### 4. `yard server` Documentation Server
|
|
272
|
+
|
|
273
|
+
The `yard server` command serves documentation for a local project or all
|
|
274
|
+
installed RubyGems. To serve documentation for a project you are working on,
|
|
275
|
+
simply run:
|
|
276
|
+
|
|
277
|
+
```sh
|
|
278
|
+
$ yard server
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
And the project inside the current directory will be parsed (if the source has
|
|
282
|
+
not yet been scanned by YARD) and served at
|
|
283
|
+
[http://localhost:8808](http://localhost:8808).
|
|
284
|
+
|
|
285
|
+
#### Live Reloading
|
|
286
|
+
|
|
287
|
+
If you want to serve documentation on a project while you document it so that
|
|
288
|
+
you can preview the results, simply pass `--reload` (`-r`) to the above command
|
|
289
|
+
and YARD will reload any changed files on each request. This will allow you to
|
|
290
|
+
change any documentation in the source and refresh to see the new contents.
|
|
291
|
+
|
|
292
|
+
#### Serving Gems
|
|
293
|
+
|
|
294
|
+
To serve documentation for all installed gems, call:
|
|
295
|
+
|
|
296
|
+
```sh
|
|
297
|
+
$ yard server --gems
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
This will also automatically build documentation for any gems that have not been
|
|
301
|
+
previously scanned. Note that in this case there will be a slight delay between
|
|
302
|
+
the first request of a newly parsed gem.
|
|
303
|
+
|
|
304
|
+
### 5. `yard graph` Graphviz Generator
|
|
305
|
+
|
|
306
|
+
You can use `yard graph` to generate dot graphs of your code. This, of course,
|
|
307
|
+
requires [Graphviz](https://www.graphviz.org) and the `dot` binary. By default
|
|
308
|
+
this will generate a graph of the classes and modules in the best UML2 notation
|
|
309
|
+
that Graphviz can support, but without any methods listed. With the `--full`
|
|
310
|
+
option, methods and attributes will be listed. There is also a `--dependencies`
|
|
311
|
+
option to show mixin inclusions. You can output to stdout or a file, or pipe
|
|
312
|
+
directly to `dot`. The same public, protected and private visibility rules apply
|
|
313
|
+
to `yard graph`. More options can be seen by typing `yard graph --help`, but
|
|
314
|
+
here is an example:
|
|
315
|
+
|
|
316
|
+
```sh
|
|
317
|
+
$ yard graph --protected --full --dependencies
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
## Changelog
|
|
321
|
+
|
|
322
|
+
See {file:CHANGELOG.md} for a list of changes.
|
|
323
|
+
|
|
324
|
+
## License
|
|
325
|
+
|
|
326
|
+
YARD © by [Loren Segal](mailto:lsegal@soen.ca). YARD is licensed
|
|
327
|
+
under the MIT license except for some files which come from the RDoc/Ruby
|
|
328
|
+
distributions. Please see the {file:LICENSE} and {file:LEGAL} documents for more
|
|
329
|
+
information.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
# We do all this work just to find the proper load path
|
|
5
|
+
path = __FILE__
|
|
6
|
+
while File.symlink?(path)
|
|
7
|
+
path = File.expand_path(File.readlink(path), File.dirname(path))
|
|
8
|
+
end
|
|
9
|
+
$LOAD_PATH.unshift(File.join(File.dirname(File.expand_path(path)), '..', 'lib'))
|
|
10
|
+
|
|
11
|
+
require 'yard'
|
|
12
|
+
|
|
13
|
+
YARD::CLI::CommandParser.run(*ARGV)
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
# We do all this work just to find the proper load path
|
|
5
|
+
path = __FILE__
|
|
6
|
+
while File.symlink?(path)
|
|
7
|
+
path = File.expand_path(File.readlink(path), File.dirname(path))
|
|
8
|
+
end
|
|
9
|
+
$LOAD_PATH.unshift(File.join(File.dirname(File.expand_path(path)), '..', 'lib'))
|
|
10
|
+
|
|
11
|
+
require 'yard'
|
|
12
|
+
|
|
13
|
+
YARD::CLI::Yardoc.run(*ARGV)
|
data/yard-0.9.44/bin/yri
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
# We do all this work just to find the proper load path
|
|
5
|
+
path = __FILE__
|
|
6
|
+
while File.symlink?(path)
|
|
7
|
+
path = File.expand_path(File.readlink(path), File.dirname(path))
|
|
8
|
+
end
|
|
9
|
+
$LOAD_PATH.unshift(File.join(File.dirname(File.expand_path(path)), '..', 'lib'))
|
|
10
|
+
|
|
11
|
+
require 'yard'
|
|
12
|
+
|
|
13
|
+
YARD::CLI::YRI.run(*ARGV)
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
# @title CodeObjects Architecture
|
|
2
|
+
|
|
3
|
+
# CodeObjects Architecture
|
|
4
|
+
|
|
5
|
+
Code objects are Ruby objects that describe the code being documented. For instance,
|
|
6
|
+
all classes, modules, methods, etc. are all extracted from the Ruby source as code
|
|
7
|
+
objects. All of these code objects extend from the {YARD::CodeObjects::Base} class, which
|
|
8
|
+
provides basic attributes like source location, source code, name and path.
|
|
9
|
+
|
|
10
|
+
## CodeObjects Organization
|
|
11
|
+
|
|
12
|
+
Code objects are divided into two basic types. {YARD::CodeObjects::NamespaceObject NamespaceObjects}
|
|
13
|
+
and non-namespace objects. A namespace object refers to any object in Ruby that can have
|
|
14
|
+
other objects defined inside of it. In the context of Ruby, this specifically means
|
|
15
|
+
modules and classes (both of which are subclasses of `NamespaceObject`). These objects
|
|
16
|
+
act like tree structures, maintaining a list of all of their direct children. All non
|
|
17
|
+
namespace objects are simply subclasses of the Base class. The {YARD::CodeObjects::RootObject RootObject}
|
|
18
|
+
is a special kind of `NamespaceObject` which refers to the top level namespace in Ruby.
|
|
19
|
+
Methods that accept a namespace object as a parameter should also accept the symbol
|
|
20
|
+
`:root` as a shortcut for the root object.
|
|
21
|
+
|
|
22
|
+
The following is an overview of the classes within the `CodeObjects` namespace:
|
|
23
|
+
|
|
24
|
+

|
|
25
|
+
|
|
26
|
+
## Unique Path Representation
|
|
27
|
+
|
|
28
|
+
All CodeObjects are uniquely defined by their implementation of {YARD::CodeObjects::Base#path}.
|
|
29
|
+
This path is used to locate or store a code object in the {YARD::Registry}. It is therefore
|
|
30
|
+
essential that any Base subclass return a unique String value for #path so that the
|
|
31
|
+
object may co-exist with other objects in the Registry.
|
|
32
|
+
|
|
33
|
+
In practice, a path is simply the conventional Ruby representation of a class,
|
|
34
|
+
module, constant, class variable or method. For example, the following objects
|
|
35
|
+
would have the following respective paths:
|
|
36
|
+
|
|
37
|
+
* Class `Klass` inside module `Mod`: `Mod::Klass`
|
|
38
|
+
* Instance method `bar` inside class `Foo`: `Foo#bar`
|
|
39
|
+
* Class method `bar` inside class `Foo`: `Foo.bar`
|
|
40
|
+
* Constant `VERSION` inside class `YARD`: `YARD::VERSION`
|
|
41
|
+
* Class variable `@@abc` inside class `A`: `A::@@abc`
|
|
42
|
+
|
|
43
|
+
## Registry
|
|
44
|
+
|
|
45
|
+
CodeObjects classes are coupled with the {YARD::Registry} class which keeps track of
|
|
46
|
+
all instantiated code objects. This is an explicit design choice to allow objects
|
|
47
|
+
to be fetched, cached, imported and exported from a centralized location. As mentioned
|
|
48
|
+
above, this coupling is a result of the fact that each object is uniquely identified by
|
|
49
|
+
its path, which is used to implement lookups. You can read more about the registry
|
|
50
|
+
in the {YARD::Registry} class.
|
|
51
|
+
|
|
52
|
+
## Identity Map
|
|
53
|
+
|
|
54
|
+
Code objects are instantiated using an identity-map like implementation that guarantees
|
|
55
|
+
only one unique Ruby object exists for an object described by a specific path. This
|
|
56
|
+
allows developers to create a code object without checking if it already exists in
|
|
57
|
+
the {YARD::Registry}. The following example will only create one object:
|
|
58
|
+
|
|
59
|
+
id = ClassObject.new(:root, "MyClass").object_id #=> 13352
|
|
60
|
+
ClassObject.new(:root, "MyClass").object_id #=> 13352
|
|
61
|
+
|
|
62
|
+
## Proxy Objects
|
|
63
|
+
|
|
64
|
+
In addition to providing access to existing objects, a {YARD::CodeObjects::Proxy}
|
|
65
|
+
class exists which can represent an object at a path that may or may not have been
|
|
66
|
+
created. This is necessary to represent a reference to an object in code that is
|
|
67
|
+
never defined in the same body of source code, or perhaps defined later. If any
|
|
68
|
+
attributes of a proxy are accessed, it will immediately be resolved to the object
|
|
69
|
+
at its declared path. In the case where such an object exists, it will act as
|
|
70
|
+
a delegate to the object. However, if the object does not exist, a warning will
|
|
71
|
+
be raised. Whenever arbitrary code objects are used, care should be taken in
|
|
72
|
+
order to make sure attributes are not accessed on unresolvable proxies. An
|
|
73
|
+
unresolvable proxy will return a class name of `Proxy` and #type of `:proxy`,
|
|
74
|
+
for example:
|
|
75
|
+
|
|
76
|
+
P(:InvalidObject).type == :proxy #=> true
|
|
77
|
+
P(:InvalidObject).is_a?(Proxy) #=> true
|
|
78
|
+
|
|
79
|
+
## Adding Data to Code Objects
|
|
80
|
+
|
|
81
|
+
Code objects act as hash-like structures that allow any arbitrary value to be set.
|
|
82
|
+
This allows easy extending of existing objects without creating custom subclasses.
|
|
83
|
+
For instance, to add a timestamp to a method object (when it was modified, maybe),
|
|
84
|
+
it is possible to simply do:
|
|
85
|
+
|
|
86
|
+
object = MethodObject.new(:root, "my_method")
|
|
87
|
+
object[:modified_at] = Time.now
|
|
88
|
+
|
|
89
|
+
This value can now be retrieved on this object both by the hash `[]` syntax as
|
|
90
|
+
well as like any other method:
|
|
91
|
+
|
|
92
|
+
object.modified_at #=> 2009-06-03 20:08:46 -0400
|
|
93
|
+
|
|
94
|
+
## Creating a Custom CodeObject
|
|
95
|
+
|
|
96
|
+
It should first be mentioned that creating a custom code object should not be
|
|
97
|
+
necessary in most cases, except when functionality that cannot be represented
|
|
98
|
+
by classical Ruby objects is added. A good example *might* be a test class,
|
|
99
|
+
which although is technically a Ruby class, has a significantly different purpose
|
|
100
|
+
in documentation and needs a different set of metadata, as well as its own
|
|
101
|
+
representation in documentation.
|
|
102
|
+
|
|
103
|
+
The {YARD::CodeObjects::Base#path} implementation is the most important part of the
|
|
104
|
+
code object architecture. The first thing any custom code object must guarantee is
|
|
105
|
+
that its path value is unique among all other objects. The recommended way to do this
|
|
106
|
+
with custom objects is to add a descriptive prefix to the path. For example, the
|
|
107
|
+
following is an implementation of the path for a hypothetical `FooObject`:
|
|
108
|
+
|
|
109
|
+
def path
|
|
110
|
+
"__FooPrefix" + sep + super
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
Note that if our FooObject is a `NamespaceObject`, meaning if it can have child
|
|
114
|
+
FooObjects defined inside of it, you may need to verify that the prefix is only
|
|
115
|
+
applied once.
|