mega-max-hub 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/mega-max-hub.gemspec +11 -0
- data/rdoc-8.0.0/CONTRIBUTING.md +195 -0
- data/rdoc-8.0.0/CVE-2013-0256.rdoc +49 -0
- data/rdoc-8.0.0/History.rdoc +1668 -0
- data/rdoc-8.0.0/LEGAL.rdoc +56 -0
- data/rdoc-8.0.0/LICENSE.rdoc +63 -0
- data/rdoc-8.0.0/README.md +236 -0
- data/rdoc-8.0.0/RI.md +842 -0
- data/rdoc-8.0.0/TODO.rdoc +60 -0
- data/rdoc-8.0.0/doc/markup_reference/markdown.md +659 -0
- data/rdoc-8.0.0/doc/markup_reference/rdoc.rdoc +1169 -0
- data/rdoc-8.0.0/exe/rdoc +43 -0
- data/rdoc-8.0.0/exe/ri +12 -0
- data/rdoc-8.0.0/lib/rdoc/code_object/alias.rb +98 -0
- data/rdoc-8.0.0/lib/rdoc/code_object/any_method.rb +387 -0
- data/rdoc-8.0.0/lib/rdoc/code_object/attr.rb +178 -0
- data/rdoc-8.0.0/lib/rdoc/code_object/class_module.rb +969 -0
- data/rdoc-8.0.0/lib/rdoc/code_object/constant.rb +221 -0
- data/rdoc-8.0.0/lib/rdoc/code_object/context/section.rb +182 -0
- data/rdoc-8.0.0/lib/rdoc/code_object/context.rb +1238 -0
- data/rdoc-8.0.0/lib/rdoc/code_object/extend.rb +9 -0
- data/rdoc-8.0.0/lib/rdoc/code_object/include.rb +9 -0
- data/rdoc-8.0.0/lib/rdoc/code_object/method_attr.rb +417 -0
- data/rdoc-8.0.0/lib/rdoc/code_object/mixin.rb +123 -0
- data/rdoc-8.0.0/lib/rdoc/code_object/normal_class.rb +92 -0
- data/rdoc-8.0.0/lib/rdoc/code_object/normal_module.rb +73 -0
- data/rdoc-8.0.0/lib/rdoc/code_object/require.rb +51 -0
- data/rdoc-8.0.0/lib/rdoc/code_object/single_class.rb +30 -0
- data/rdoc-8.0.0/lib/rdoc/code_object/top_level.rb +286 -0
- data/rdoc-8.0.0/lib/rdoc/code_object.rb +393 -0
- data/rdoc-8.0.0/lib/rdoc/code_objects.rb +5 -0
- data/rdoc-8.0.0/lib/rdoc/comment.rb +353 -0
- data/rdoc-8.0.0/lib/rdoc/cross_reference.rb +215 -0
- data/rdoc-8.0.0/lib/rdoc/encoding.rb +120 -0
- data/rdoc-8.0.0/lib/rdoc/erb_partial.rb +18 -0
- data/rdoc-8.0.0/lib/rdoc/erbio.rb +37 -0
- data/rdoc-8.0.0/lib/rdoc/generator/aliki.rb +200 -0
- data/rdoc-8.0.0/lib/rdoc/generator/darkfish.rb +824 -0
- data/rdoc-8.0.0/lib/rdoc/generator/json_index.rb +284 -0
- data/rdoc-8.0.0/lib/rdoc/generator/markup.rb +196 -0
- data/rdoc-8.0.0/lib/rdoc/generator/pot/message_extractor.rb +68 -0
- data/rdoc-8.0.0/lib/rdoc/generator/pot/po.rb +84 -0
- data/rdoc-8.0.0/lib/rdoc/generator/pot/po_entry.rb +141 -0
- data/rdoc-8.0.0/lib/rdoc/generator/pot.rb +94 -0
- data/rdoc-8.0.0/lib/rdoc/generator/ri.rb +30 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/aliki/DESIGN.md +536 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/aliki/_aside_toc.rhtml +8 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/aliki/_footer.rhtml +23 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/aliki/_head.rhtml +163 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/aliki/_header.rhtml +56 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/aliki/_icons.rhtml +208 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/aliki/_sidebar_ancestors.rhtml +16 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/aliki/_sidebar_classes.rhtml +15 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/aliki/_sidebar_extends.rhtml +27 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/aliki/_sidebar_includes.rhtml +27 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/aliki/_sidebar_installed.rhtml +16 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/aliki/_sidebar_methods.rhtml +41 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/aliki/_sidebar_pages.rhtml +67 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/aliki/_sidebar_search.rhtml +15 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/aliki/_sidebar_sections.rhtml +21 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/aliki/_sidebar_toggle.rhtml +3 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/aliki/class.rhtml +230 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/aliki/css/rdoc.css +2181 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/aliki/index.rhtml +22 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/aliki/js/aliki.js +513 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/aliki/js/bash_highlighter.js +167 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/aliki/js/c_highlighter.js +299 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/aliki/js/search_controller.js +129 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/aliki/js/search_navigation.js +105 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/aliki/js/search_ranker.js +239 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/aliki/js/theme-toggle.js +112 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/aliki/page.rhtml +18 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/aliki/servlet_not_found.rhtml +14 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/aliki/servlet_root.rhtml +65 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/_footer.rhtml +5 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/_head.rhtml +43 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/_sidebar_classes.rhtml +5 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/_sidebar_extends.rhtml +17 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/_sidebar_includes.rhtml +17 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/_sidebar_installed.rhtml +16 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/_sidebar_methods.rhtml +21 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/_sidebar_navigation.rhtml +11 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/_sidebar_pages.rhtml +32 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/_sidebar_parent.rhtml +6 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/_sidebar_search.rhtml +15 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/_sidebar_sections.rhtml +11 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/_sidebar_table_of_contents.rhtml +39 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/_sidebar_toggle.rhtml +3 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/class.rhtml +220 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/css/fonts.css +167 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/css/rdoc.css +701 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/fonts/Lato-Light.ttf +0 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/fonts/Lato-LightItalic.ttf +0 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/fonts/Lato-Regular.ttf +0 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/fonts/Lato-RegularItalic.ttf +0 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/fonts/SourceCodePro-Bold.ttf +0 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/fonts/SourceCodePro-Regular.ttf +0 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/images/add.png +0 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/images/arrow_up.png +0 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/images/brick.png +0 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/images/brick_link.png +0 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/images/bug.png +0 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/images/bullet_black.png +0 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/images/bullet_toggle_minus.png +0 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/images/bullet_toggle_plus.png +0 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/images/date.png +0 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/images/delete.png +0 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/images/find.png +0 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/images/loadingAnimation.gif +0 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/images/macFFBgHack.png +0 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/images/package.png +0 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/images/page_green.png +0 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/images/page_white_text.png +0 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/images/page_white_width.png +0 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/images/plugin.png +0 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/images/ruby.png +0 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/images/tag_blue.png +0 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/images/tag_green.png +0 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/images/transparent.png +0 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/images/wrench.png +0 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/images/wrench_orange.png +0 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/images/zoom.png +0 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/index.rhtml +24 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/js/darkfish.js +140 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/js/search.js +120 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/page.rhtml +19 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/servlet_not_found.rhtml +21 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/servlet_root.rhtml +65 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/table_of_contents.rhtml +72 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/json_index/js/navigation.js +105 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/json_index/js/searcher.js +271 -0
- data/rdoc-8.0.0/lib/rdoc/generator.rb +52 -0
- data/rdoc-8.0.0/lib/rdoc/i18n/locale.rb +102 -0
- data/rdoc-8.0.0/lib/rdoc/i18n/text.rb +126 -0
- data/rdoc-8.0.0/lib/rdoc/i18n.rb +10 -0
- data/rdoc-8.0.0/lib/rdoc/known_classes.rb +74 -0
- data/rdoc-8.0.0/lib/rdoc/markdown/entities.rb +2131 -0
- data/rdoc-8.0.0/lib/rdoc/markdown/literals.kpeg +21 -0
- data/rdoc-8.0.0/lib/rdoc/markdown/literals.rb +454 -0
- data/rdoc-8.0.0/lib/rdoc/markdown.kpeg +1315 -0
- data/rdoc-8.0.0/lib/rdoc/markdown.rb +16865 -0
- data/rdoc-8.0.0/lib/rdoc/markup/blank_line.rb +29 -0
- data/rdoc-8.0.0/lib/rdoc/markup/block_quote.rb +14 -0
- data/rdoc-8.0.0/lib/rdoc/markup/document.rb +164 -0
- data/rdoc-8.0.0/lib/rdoc/markup/element.rb +21 -0
- data/rdoc-8.0.0/lib/rdoc/markup/formatter.rb +285 -0
- data/rdoc-8.0.0/lib/rdoc/markup/hard_break.rb +34 -0
- data/rdoc-8.0.0/lib/rdoc/markup/heading.rb +170 -0
- data/rdoc-8.0.0/lib/rdoc/markup/include.rb +42 -0
- data/rdoc-8.0.0/lib/rdoc/markup/indented_paragraph.rb +47 -0
- data/rdoc-8.0.0/lib/rdoc/markup/inline_parser.rb +312 -0
- data/rdoc-8.0.0/lib/rdoc/markup/list.rb +101 -0
- data/rdoc-8.0.0/lib/rdoc/markup/list_item.rb +99 -0
- data/rdoc-8.0.0/lib/rdoc/markup/paragraph.rb +28 -0
- data/rdoc-8.0.0/lib/rdoc/markup/parser.rb +585 -0
- data/rdoc-8.0.0/lib/rdoc/markup/pre_process.rb +317 -0
- data/rdoc-8.0.0/lib/rdoc/markup/raw.rb +66 -0
- data/rdoc-8.0.0/lib/rdoc/markup/rule.rb +20 -0
- data/rdoc-8.0.0/lib/rdoc/markup/table.rb +64 -0
- data/rdoc-8.0.0/lib/rdoc/markup/to_ansi.rb +144 -0
- data/rdoc-8.0.0/lib/rdoc/markup/to_bs.rb +86 -0
- data/rdoc-8.0.0/lib/rdoc/markup/to_html.rb +682 -0
- data/rdoc-8.0.0/lib/rdoc/markup/to_html_crossref.rb +261 -0
- data/rdoc-8.0.0/lib/rdoc/markup/to_html_snippet.rb +287 -0
- data/rdoc-8.0.0/lib/rdoc/markup/to_joined_paragraph.rb +41 -0
- data/rdoc-8.0.0/lib/rdoc/markup/to_label.rb +84 -0
- data/rdoc-8.0.0/lib/rdoc/markup/to_markdown.rb +215 -0
- data/rdoc-8.0.0/lib/rdoc/markup/to_rdoc.rb +421 -0
- data/rdoc-8.0.0/lib/rdoc/markup/to_table_of_contents.rb +88 -0
- data/rdoc-8.0.0/lib/rdoc/markup/to_test.rb +77 -0
- data/rdoc-8.0.0/lib/rdoc/markup/to_tt_only.rb +107 -0
- data/rdoc-8.0.0/lib/rdoc/markup/verbatim.rb +83 -0
- data/rdoc-8.0.0/lib/rdoc/markup.rb +219 -0
- data/rdoc-8.0.0/lib/rdoc/options.rb +1412 -0
- data/rdoc-8.0.0/lib/rdoc/parser/c.rb +1227 -0
- data/rdoc-8.0.0/lib/rdoc/parser/changelog.rb +379 -0
- data/rdoc-8.0.0/lib/rdoc/parser/markdown.rb +22 -0
- data/rdoc-8.0.0/lib/rdoc/parser/rbs.rb +275 -0
- data/rdoc-8.0.0/lib/rdoc/parser/rd.rb +22 -0
- data/rdoc-8.0.0/lib/rdoc/parser/ruby.rb +1266 -0
- data/rdoc-8.0.0/lib/rdoc/parser/ruby_colorizer.rb +253 -0
- data/rdoc-8.0.0/lib/rdoc/parser/simple.rb +44 -0
- data/rdoc-8.0.0/lib/rdoc/parser/text.rb +11 -0
- data/rdoc-8.0.0/lib/rdoc/parser.rb +298 -0
- data/rdoc-8.0.0/lib/rdoc/rbs_helper.rb +186 -0
- data/rdoc-8.0.0/lib/rdoc/rd/block_parser.rb +1706 -0
- data/rdoc-8.0.0/lib/rdoc/rd/block_parser.ry +643 -0
- data/rdoc-8.0.0/lib/rdoc/rd/inline.rb +71 -0
- data/rdoc-8.0.0/lib/rdoc/rd/inline_parser.rb +1854 -0
- data/rdoc-8.0.0/lib/rdoc/rd/inline_parser.ry +593 -0
- data/rdoc-8.0.0/lib/rdoc/rd.rb +99 -0
- data/rdoc-8.0.0/lib/rdoc/rdoc.rb +724 -0
- data/rdoc-8.0.0/lib/rdoc/ri/driver.rb +1572 -0
- data/rdoc-8.0.0/lib/rdoc/ri/formatter.rb +6 -0
- data/rdoc-8.0.0/lib/rdoc/ri/paths.rb +171 -0
- data/rdoc-8.0.0/lib/rdoc/ri/servlet.rb +452 -0
- data/rdoc-8.0.0/lib/rdoc/ri/store.rb +6 -0
- data/rdoc-8.0.0/lib/rdoc/ri/task.rb +71 -0
- data/rdoc-8.0.0/lib/rdoc/ri.rb +21 -0
- data/rdoc-8.0.0/lib/rdoc/rubygems_hook.rb +327 -0
- data/rdoc-8.0.0/lib/rdoc/server.rb +460 -0
- data/rdoc-8.0.0/lib/rdoc/stats/normal.rb +58 -0
- data/rdoc-8.0.0/lib/rdoc/stats/quiet.rb +59 -0
- data/rdoc-8.0.0/lib/rdoc/stats/verbose.rb +44 -0
- data/rdoc-8.0.0/lib/rdoc/stats.rb +484 -0
- data/rdoc-8.0.0/lib/rdoc/store.rb +1205 -0
- data/rdoc-8.0.0/lib/rdoc/task.rb +355 -0
- data/rdoc-8.0.0/lib/rdoc/text.rb +244 -0
- data/rdoc-8.0.0/lib/rdoc/token_stream.rb +104 -0
- data/rdoc-8.0.0/lib/rdoc/tom_doc.rb +257 -0
- data/rdoc-8.0.0/lib/rdoc/version.rb +10 -0
- data/rdoc-8.0.0/lib/rdoc.rb +239 -0
- data/rdoc-8.0.0/lib/rubygems_plugin.rb +14 -0
- data/rdoc-8.0.0/man/ri.1 +249 -0
- data/rdoc-8.0.0/rdoc-logo.svg +43 -0
- data/rdoc-8.0.0/rdoc.gemspec +74 -0
- metadata +256 -0
|
@@ -0,0 +1,393 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
##
|
|
3
|
+
# Base class for the RDoc code tree.
|
|
4
|
+
#
|
|
5
|
+
# We contain the common stuff for contexts (which are containers) and other
|
|
6
|
+
# elements (methods, attributes and so on)
|
|
7
|
+
#
|
|
8
|
+
# Here's the tree of the CodeObject subclasses:
|
|
9
|
+
#
|
|
10
|
+
# * RDoc::Context
|
|
11
|
+
# * RDoc::TopLevel
|
|
12
|
+
# * RDoc::ClassModule
|
|
13
|
+
# * RDoc::NormalClass
|
|
14
|
+
# * RDoc::NormalModule
|
|
15
|
+
# * RDoc::SingleClass
|
|
16
|
+
# * RDoc::MethodAttr
|
|
17
|
+
# * RDoc::Attr
|
|
18
|
+
# * RDoc::AnyMethod
|
|
19
|
+
# * RDoc::Alias
|
|
20
|
+
# * RDoc::Constant
|
|
21
|
+
# * RDoc::Require
|
|
22
|
+
# * RDoc::Mixin
|
|
23
|
+
# * RDoc::Include
|
|
24
|
+
# * RDoc::Extend
|
|
25
|
+
|
|
26
|
+
class RDoc::CodeObject
|
|
27
|
+
|
|
28
|
+
include RDoc::Text
|
|
29
|
+
|
|
30
|
+
##
|
|
31
|
+
# Our comment
|
|
32
|
+
|
|
33
|
+
attr_reader :comment
|
|
34
|
+
|
|
35
|
+
##
|
|
36
|
+
# Do we document our children?
|
|
37
|
+
|
|
38
|
+
attr_reader :document_children
|
|
39
|
+
|
|
40
|
+
##
|
|
41
|
+
# Do we document ourselves?
|
|
42
|
+
|
|
43
|
+
attr_reader :document_self
|
|
44
|
+
|
|
45
|
+
##
|
|
46
|
+
# Are we done documenting (ie, did we come across a :enddoc:)?
|
|
47
|
+
|
|
48
|
+
attr_reader :done_documenting
|
|
49
|
+
|
|
50
|
+
##
|
|
51
|
+
# Which file this code object was defined in
|
|
52
|
+
|
|
53
|
+
attr_reader :file
|
|
54
|
+
|
|
55
|
+
##
|
|
56
|
+
# Force documentation of this CodeObject
|
|
57
|
+
|
|
58
|
+
attr_reader :force_documentation
|
|
59
|
+
|
|
60
|
+
##
|
|
61
|
+
# Line in #file where this CodeObject was defined
|
|
62
|
+
|
|
63
|
+
attr_accessor :line
|
|
64
|
+
|
|
65
|
+
##
|
|
66
|
+
# Hash of arbitrary metadata for this CodeObject
|
|
67
|
+
|
|
68
|
+
attr_reader :metadata
|
|
69
|
+
|
|
70
|
+
##
|
|
71
|
+
# Sets the parent CodeObject
|
|
72
|
+
|
|
73
|
+
attr_writer :parent
|
|
74
|
+
|
|
75
|
+
##
|
|
76
|
+
# Did we ever receive a +:nodoc:+ directive?
|
|
77
|
+
|
|
78
|
+
attr_reader :received_nodoc
|
|
79
|
+
|
|
80
|
+
##
|
|
81
|
+
# Set the section this CodeObject is in
|
|
82
|
+
|
|
83
|
+
attr_writer :section
|
|
84
|
+
|
|
85
|
+
##
|
|
86
|
+
# The RDoc::Store for this object.
|
|
87
|
+
|
|
88
|
+
attr_reader :store
|
|
89
|
+
|
|
90
|
+
##
|
|
91
|
+
# When mixed-in to a class, this points to the Context in which it was originally defined.
|
|
92
|
+
|
|
93
|
+
attr_accessor :mixin_from
|
|
94
|
+
|
|
95
|
+
##
|
|
96
|
+
# Creates a new CodeObject that will document itself and its children
|
|
97
|
+
|
|
98
|
+
def initialize
|
|
99
|
+
@metadata = {}
|
|
100
|
+
@comment = ''
|
|
101
|
+
@parent = nil
|
|
102
|
+
@parent_name = nil # for loading
|
|
103
|
+
@parent_class = nil # for loading
|
|
104
|
+
@section = nil
|
|
105
|
+
@section_title = nil # for loading
|
|
106
|
+
@file = nil
|
|
107
|
+
@full_name = nil
|
|
108
|
+
@store = nil
|
|
109
|
+
@track_visibility = true
|
|
110
|
+
@mixin_from = nil
|
|
111
|
+
|
|
112
|
+
initialize_visibility
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
##
|
|
116
|
+
# Initializes state for visibility of this CodeObject and its children.
|
|
117
|
+
|
|
118
|
+
def initialize_visibility # :nodoc:
|
|
119
|
+
@document_children = true
|
|
120
|
+
@document_self = true
|
|
121
|
+
@done_documenting = false
|
|
122
|
+
@force_documentation = false
|
|
123
|
+
@received_nodoc = false
|
|
124
|
+
@ignored = false
|
|
125
|
+
@suppressed = false
|
|
126
|
+
@track_visibility = true
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
##
|
|
130
|
+
# Replaces our comment with +comment+, unless it is empty.
|
|
131
|
+
|
|
132
|
+
def comment=(comment)
|
|
133
|
+
@comment = case comment
|
|
134
|
+
when NilClass then ''
|
|
135
|
+
when RDoc::Comment then comment.normalize
|
|
136
|
+
else
|
|
137
|
+
if comment and not comment.empty? then
|
|
138
|
+
normalize_comment comment
|
|
139
|
+
else
|
|
140
|
+
# HACK correct fix is to have #initialize create @comment
|
|
141
|
+
# with the correct encoding
|
|
142
|
+
if String === @comment and @comment.empty? then
|
|
143
|
+
@comment = RDoc::Encoding.change_encoding @comment, comment.encoding
|
|
144
|
+
end
|
|
145
|
+
@comment
|
|
146
|
+
end
|
|
147
|
+
end
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
##
|
|
151
|
+
# Should this CodeObject be displayed in output?
|
|
152
|
+
#
|
|
153
|
+
# A code object should be displayed if:
|
|
154
|
+
#
|
|
155
|
+
# * The item didn't have a nodoc or wasn't in a container that had nodoc
|
|
156
|
+
# * The item wasn't ignored
|
|
157
|
+
# * The item has documentation and was not suppressed
|
|
158
|
+
|
|
159
|
+
def display?
|
|
160
|
+
@document_self and not @ignored and
|
|
161
|
+
(documented? or not @suppressed)
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
##
|
|
165
|
+
# Enables or disables documentation of this CodeObject's children unless it
|
|
166
|
+
# has been turned off by :enddoc:
|
|
167
|
+
|
|
168
|
+
def document_children=(document_children)
|
|
169
|
+
return unless @track_visibility
|
|
170
|
+
|
|
171
|
+
@document_children = document_children unless @done_documenting
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
##
|
|
175
|
+
# Enables or disables documentation of this CodeObject unless it has been
|
|
176
|
+
# turned off by :enddoc:. If the argument is +nil+ it means the
|
|
177
|
+
# documentation is turned off by +:nodoc:+.
|
|
178
|
+
|
|
179
|
+
def document_self=(document_self)
|
|
180
|
+
return unless @track_visibility
|
|
181
|
+
return if @done_documenting
|
|
182
|
+
|
|
183
|
+
@document_self = document_self
|
|
184
|
+
@received_nodoc = true if document_self.nil?
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
##
|
|
188
|
+
# Does this object have a comment with content or is #received_nodoc true?
|
|
189
|
+
|
|
190
|
+
def documented?
|
|
191
|
+
@received_nodoc or !@comment.empty?
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
##
|
|
195
|
+
# Turns documentation on/off, and turns on/off #document_self
|
|
196
|
+
# and #document_children.
|
|
197
|
+
#
|
|
198
|
+
# Once documentation has been turned off (by +:enddoc:+),
|
|
199
|
+
# the object will refuse to turn #document_self or
|
|
200
|
+
# #document_children on, so +:doc:+ and +:start_doc:+ directives
|
|
201
|
+
# will have no effect in the current file.
|
|
202
|
+
|
|
203
|
+
def done_documenting=(value)
|
|
204
|
+
return unless @track_visibility
|
|
205
|
+
@done_documenting = value
|
|
206
|
+
@document_self = !value
|
|
207
|
+
@document_children = @document_self
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
##
|
|
211
|
+
# File name where this CodeObject was found.
|
|
212
|
+
#
|
|
213
|
+
# See also RDoc::Context#in_files
|
|
214
|
+
|
|
215
|
+
def file_name
|
|
216
|
+
return unless @file
|
|
217
|
+
|
|
218
|
+
@file.absolute_name
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
##
|
|
222
|
+
# Force the documentation of this object unless documentation
|
|
223
|
+
# has been turned off by :enddoc:
|
|
224
|
+
#--
|
|
225
|
+
# HACK untested, was assigning to an ivar
|
|
226
|
+
|
|
227
|
+
def force_documentation=(value)
|
|
228
|
+
@force_documentation = value unless @done_documenting
|
|
229
|
+
end
|
|
230
|
+
|
|
231
|
+
##
|
|
232
|
+
# Sets the full_name overriding any computed full name.
|
|
233
|
+
#
|
|
234
|
+
# Set to +nil+ to clear RDoc's cached value
|
|
235
|
+
|
|
236
|
+
def full_name=(full_name)
|
|
237
|
+
@full_name = full_name
|
|
238
|
+
end
|
|
239
|
+
|
|
240
|
+
##
|
|
241
|
+
# Use this to ignore a CodeObject and all its children until found again
|
|
242
|
+
# (#record_location is called). An ignored item will not be displayed in
|
|
243
|
+
# documentation.
|
|
244
|
+
#
|
|
245
|
+
# See github issue #55
|
|
246
|
+
#
|
|
247
|
+
# The ignored status is temporary in order to allow implementation details
|
|
248
|
+
# to be hidden. At the end of processing a file RDoc allows all classes
|
|
249
|
+
# and modules to add new documentation to previously created classes.
|
|
250
|
+
#
|
|
251
|
+
# If a class was ignored (via stopdoc) then reopened later with additional
|
|
252
|
+
# documentation it should be displayed. If a class was ignored and never
|
|
253
|
+
# reopened it should not be displayed. The ignore flag allows this to
|
|
254
|
+
# occur.
|
|
255
|
+
|
|
256
|
+
def ignore
|
|
257
|
+
return unless @track_visibility
|
|
258
|
+
|
|
259
|
+
@ignored = true
|
|
260
|
+
|
|
261
|
+
stop_doc
|
|
262
|
+
end
|
|
263
|
+
|
|
264
|
+
##
|
|
265
|
+
# Has this class been ignored?
|
|
266
|
+
#
|
|
267
|
+
# See also #ignore
|
|
268
|
+
|
|
269
|
+
def ignored?
|
|
270
|
+
@ignored
|
|
271
|
+
end
|
|
272
|
+
|
|
273
|
+
##
|
|
274
|
+
# The options instance from the store this CodeObject is attached to, or a
|
|
275
|
+
# default options instance if the CodeObject is not attached.
|
|
276
|
+
#
|
|
277
|
+
# Used by: store= (visibility check), ClassModule#path, TopLevel#path,
|
|
278
|
+
# ClassModule#embed_mixins
|
|
279
|
+
|
|
280
|
+
def options
|
|
281
|
+
@store&.options || RDoc::Options.new
|
|
282
|
+
end
|
|
283
|
+
|
|
284
|
+
##
|
|
285
|
+
# Our parent CodeObject. The parent may be missing for classes loaded from
|
|
286
|
+
# legacy RI data stores.
|
|
287
|
+
|
|
288
|
+
def parent
|
|
289
|
+
return @parent if @parent
|
|
290
|
+
return nil unless @parent_name
|
|
291
|
+
|
|
292
|
+
if @parent_class == RDoc::TopLevel then
|
|
293
|
+
@parent = @store.add_file @parent_name
|
|
294
|
+
else
|
|
295
|
+
@parent = @store.find_class_or_module @parent_name
|
|
296
|
+
|
|
297
|
+
return @parent if @parent
|
|
298
|
+
|
|
299
|
+
begin
|
|
300
|
+
@parent = @store.load_class @parent_name
|
|
301
|
+
rescue RDoc::Store::MissingFileError
|
|
302
|
+
nil
|
|
303
|
+
end
|
|
304
|
+
end
|
|
305
|
+
end
|
|
306
|
+
|
|
307
|
+
##
|
|
308
|
+
# Name of our parent
|
|
309
|
+
|
|
310
|
+
def parent_name
|
|
311
|
+
@parent ? @parent.full_name : '(unknown)'
|
|
312
|
+
end
|
|
313
|
+
|
|
314
|
+
##
|
|
315
|
+
# Records the RDoc::TopLevel (file) where this code object was defined
|
|
316
|
+
|
|
317
|
+
def record_location(top_level)
|
|
318
|
+
@ignored = false
|
|
319
|
+
@suppressed = false
|
|
320
|
+
@file = top_level
|
|
321
|
+
end
|
|
322
|
+
|
|
323
|
+
##
|
|
324
|
+
# The section this CodeObject is in. Sections allow grouping of constants,
|
|
325
|
+
# attributes and methods inside a class or module.
|
|
326
|
+
|
|
327
|
+
def section
|
|
328
|
+
return @section if @section
|
|
329
|
+
|
|
330
|
+
@section = parent.add_section @section_title if parent
|
|
331
|
+
end
|
|
332
|
+
|
|
333
|
+
##
|
|
334
|
+
# Enable capture of documentation unless documentation has been
|
|
335
|
+
# turned off by :enddoc:
|
|
336
|
+
|
|
337
|
+
def start_doc
|
|
338
|
+
return if @done_documenting
|
|
339
|
+
|
|
340
|
+
@document_self = true
|
|
341
|
+
@document_children = true
|
|
342
|
+
@ignored = false
|
|
343
|
+
@suppressed = false
|
|
344
|
+
end
|
|
345
|
+
|
|
346
|
+
##
|
|
347
|
+
# Disable capture of documentation
|
|
348
|
+
|
|
349
|
+
def stop_doc
|
|
350
|
+
return unless @track_visibility
|
|
351
|
+
|
|
352
|
+
@document_self = false
|
|
353
|
+
@document_children = false
|
|
354
|
+
end
|
|
355
|
+
|
|
356
|
+
##
|
|
357
|
+
# Sets the +store+ that contains this CodeObject
|
|
358
|
+
|
|
359
|
+
def store=(store)
|
|
360
|
+
@store = store
|
|
361
|
+
|
|
362
|
+
return unless @track_visibility
|
|
363
|
+
|
|
364
|
+
if :nodoc == options.visibility then
|
|
365
|
+
initialize_visibility
|
|
366
|
+
@track_visibility = false
|
|
367
|
+
end
|
|
368
|
+
end
|
|
369
|
+
|
|
370
|
+
##
|
|
371
|
+
# Use this to suppress a CodeObject and all its children until the next file
|
|
372
|
+
# it is seen in or documentation is discovered. A suppressed item with
|
|
373
|
+
# documentation will be displayed while an ignored item with documentation
|
|
374
|
+
# may not be displayed.
|
|
375
|
+
|
|
376
|
+
def suppress
|
|
377
|
+
return unless @track_visibility
|
|
378
|
+
|
|
379
|
+
@suppressed = true
|
|
380
|
+
|
|
381
|
+
stop_doc
|
|
382
|
+
end
|
|
383
|
+
|
|
384
|
+
##
|
|
385
|
+
# Has this class been suppressed?
|
|
386
|
+
#
|
|
387
|
+
# See also #suppress
|
|
388
|
+
|
|
389
|
+
def suppressed?
|
|
390
|
+
@suppressed
|
|
391
|
+
end
|
|
392
|
+
|
|
393
|
+
end
|