yard 0.9.23 → 0.9.27
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of yard might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/.dockerignore +0 -0
- data/.gitattributes +4 -0
- data/.github/FUNDING.yml +3 -0
- data/.github/ISSUE_TEMPLATE.md +6 -6
- data/.github/PULL_REQUEST_TEMPLATE.md +5 -5
- data/.github/workflows/ci.yml +30 -0
- data/.github/workflows/gem.yml +19 -0
- data/.gitignore +0 -0
- data/.rspec +0 -0
- data/.rubocop.yml +37 -24
- data/.yardopts +0 -0
- data/.yardopts_guide +0 -0
- data/.yardopts_i18n +0 -0
- data/CHANGELOG.md +50 -4
- data/CONTRIBUTING.md +2 -2
- data/Gemfile +5 -3
- data/README.md +97 -102
- data/Rakefile +2 -3
- data/lib/yard/cli/diff.rb +4 -1
- data/lib/yard/cli/server.rb +22 -13
- data/lib/yard/cli/stats.rb +2 -0
- data/lib/yard/cli/yardoc.rb +2 -1
- data/lib/yard/code_objects/method_object.rb +1 -1
- data/lib/yard/code_objects/namespace_mapper.rb +30 -3
- data/lib/yard/code_objects/proxy.rb +2 -1
- data/lib/yard/globals.rb +1 -1
- data/lib/yard/handlers/c/base.rb +35 -0
- data/lib/yard/handlers/ruby/method_handler.rb +1 -1
- data/lib/yard/handlers/ruby/mixin_handler.rb +7 -2
- data/lib/yard/handlers/ruby/module_function_handler.rb +15 -3
- data/lib/yard/parser/ruby/ast_node.rb +2 -2
- data/lib/yard/parser/ruby/ruby_parser.rb +7 -5
- data/lib/yard/parser/ruby/token_resolver.rb +3 -1
- data/lib/yard/parser/source_parser.rb +1 -1
- data/lib/yard/registry_resolver.rb +10 -24
- data/lib/yard/registry_store.rb +1 -1
- data/lib/yard/serializers/yardoc_serializer.rb +1 -1
- data/lib/yard/server/commands/base.rb +2 -2
- data/lib/yard/server/commands/library_command.rb +1 -1
- data/lib/yard/tags/directives.rb +10 -1
- data/lib/yard/templates/helpers/html_helper.rb +15 -5
- data/lib/yard/templates/helpers/markup/rdoc_markup.rb +5 -4
- data/lib/yard/templates/helpers/markup_helper.rb +2 -1
- data/lib/yard/templates/section.rb +1 -3
- data/lib/yard/version.rb +1 -1
- data/lib/yard.rb +3 -0
- data/samus.json +15 -46
- data/tasks/prepare_tag.rake +45 -0
- data/tasks/update_error_map.rake +53 -0
- data/templates/default/fulldoc/html/css/style.css +1 -0
- data/yard.gemspec +3 -2
- metadata +23 -207
- data/.travis.yml +0 -52
- data/spec/cli/command_parser_spec.rb +0 -43
- data/spec/cli/command_spec.rb +0 -36
- data/spec/cli/config_spec.rb +0 -148
- data/spec/cli/diff_spec.rb +0 -254
- data/spec/cli/display_spec.rb +0 -30
- data/spec/cli/gems_spec.rb +0 -81
- data/spec/cli/graph_spec.rb +0 -18
- data/spec/cli/help_spec.rb +0 -22
- data/spec/cli/i18n_spec.rb +0 -107
- data/spec/cli/list_spec.rb +0 -8
- data/spec/cli/markup_types_spec.rb +0 -22
- data/spec/cli/server_spec.rb +0 -324
- data/spec/cli/stats_spec.rb +0 -96
- data/spec/cli/yard_on_yard_spec.rb +0 -38
- data/spec/cli/yardoc_spec.rb +0 -896
- data/spec/cli/yri_spec.rb +0 -101
- data/spec/code_objects/base_spec.rb +0 -485
- data/spec/code_objects/class_object_spec.rb +0 -226
- data/spec/code_objects/code_object_list_spec.rb +0 -36
- data/spec/code_objects/constants_spec.rb +0 -116
- data/spec/code_objects/extra_file_object_spec.rb +0 -161
- data/spec/code_objects/macro_object_spec.rb +0 -150
- data/spec/code_objects/method_object_spec.rb +0 -184
- data/spec/code_objects/module_object_spec.rb +0 -142
- data/spec/code_objects/namespace_object_spec.rb +0 -171
- data/spec/code_objects/proxy_spec.rb +0 -147
- data/spec/code_objects/spec_helper.rb +0 -3
- data/spec/config_spec.rb +0 -171
- data/spec/core_ext/array_spec.rb +0 -13
- data/spec/core_ext/file_spec.rb +0 -72
- data/spec/core_ext/hash_spec.rb +0 -14
- data/spec/core_ext/insertion_spec.rb +0 -37
- data/spec/core_ext/module_spec.rb +0 -9
- data/spec/core_ext/string_spec.rb +0 -42
- data/spec/core_ext/symbol_hash_spec.rb +0 -89
- data/spec/docstring_parser_spec.rb +0 -280
- data/spec/docstring_spec.rb +0 -373
- data/spec/handlers/alias_handler_spec.rb +0 -82
- data/spec/handlers/attribute_handler_spec.rb +0 -96
- data/spec/handlers/base_spec.rb +0 -216
- data/spec/handlers/c/alias_handler_spec.rb +0 -34
- data/spec/handlers/c/attribute_handler_spec.rb +0 -41
- data/spec/handlers/c/class_handler_spec.rb +0 -78
- data/spec/handlers/c/constant_handler_spec.rb +0 -71
- data/spec/handlers/c/init_handler_spec.rb +0 -48
- data/spec/handlers/c/method_handler_spec.rb +0 -327
- data/spec/handlers/c/mixin_handler_spec.rb +0 -44
- data/spec/handlers/c/module_handler_spec.rb +0 -71
- data/spec/handlers/c/override_comment_handler_spec.rb +0 -47
- data/spec/handlers/c/path_handler_spec.rb +0 -36
- data/spec/handlers/c/spec_helper.rb +0 -23
- data/spec/handlers/c/struct_handler_spec.rb +0 -16
- data/spec/handlers/class_condition_handler_spec.rb +0 -87
- data/spec/handlers/class_handler_spec.rb +0 -247
- data/spec/handlers/class_method_handler_shared_examples.rb +0 -133
- data/spec/handlers/class_variable_handler_spec.rb +0 -12
- data/spec/handlers/constant_handler_spec.rb +0 -112
- data/spec/handlers/decorator_handler_methods_spec.rb +0 -393
- data/spec/handlers/dsl_handler_spec.rb +0 -226
- data/spec/handlers/examples/alias_handler_001.rb.txt +0 -46
- data/spec/handlers/examples/attribute_handler_001.rb.txt +0 -32
- data/spec/handlers/examples/class_condition_handler_001.rb.txt +0 -69
- data/spec/handlers/examples/class_handler_001.rb.txt +0 -120
- data/spec/handlers/examples/class_variable_handler_001.rb.txt +0 -10
- data/spec/handlers/examples/constant_handler_001.rb.txt +0 -35
- data/spec/handlers/examples/dsl_handler_001.rb.txt +0 -156
- data/spec/handlers/examples/exception_handler_001.rb.txt +0 -59
- data/spec/handlers/examples/extend_handler_001.rb.txt +0 -19
- data/spec/handlers/examples/method_condition_handler_001.rb.txt +0 -10
- data/spec/handlers/examples/method_handler_001.rb.txt +0 -128
- data/spec/handlers/examples/mixin_handler_001.rb.txt +0 -40
- data/spec/handlers/examples/module_handler_001.rb.txt +0 -29
- data/spec/handlers/examples/private_constant_handler_001.rb.txt +0 -8
- data/spec/handlers/examples/process_handler_001.rb.txt +0 -11
- data/spec/handlers/examples/visibility_handler_001.rb.txt +0 -36
- data/spec/handlers/examples/yield_handler_001.rb.txt +0 -54
- data/spec/handlers/exception_handler_spec.rb +0 -49
- data/spec/handlers/extend_handler_spec.rb +0 -28
- data/spec/handlers/legacy_base_spec.rb +0 -128
- data/spec/handlers/method_condition_handler_spec.rb +0 -15
- data/spec/handlers/method_handler_spec.rb +0 -214
- data/spec/handlers/mixin_handler_spec.rb +0 -60
- data/spec/handlers/module_function_handler_spec.rb +0 -106
- data/spec/handlers/module_handler_spec.rb +0 -35
- data/spec/handlers/private_class_method_handler_spec.rb +0 -11
- data/spec/handlers/private_constant_handler_spec.rb +0 -25
- data/spec/handlers/processor_spec.rb +0 -35
- data/spec/handlers/public_class_method_handler_spec.rb +0 -11
- data/spec/handlers/ruby/base_spec.rb +0 -95
- data/spec/handlers/ruby/legacy/base_spec.rb +0 -84
- data/spec/handlers/spec_helper.rb +0 -33
- data/spec/handlers/visibility_handler_spec.rb +0 -44
- data/spec/handlers/yield_handler_spec.rb +0 -52
- data/spec/i18n/locale_spec.rb +0 -81
- data/spec/i18n/message_spec.rb +0 -52
- data/spec/i18n/messages_spec.rb +0 -67
- data/spec/i18n/pot_generator_spec.rb +0 -295
- data/spec/i18n/text_spec.rb +0 -184
- data/spec/logging_spec.rb +0 -44
- data/spec/options_spec.rb +0 -171
- data/spec/parser/base_spec.rb +0 -24
- data/spec/parser/c_parser_spec.rb +0 -236
- data/spec/parser/examples/array.c.txt +0 -6267
- data/spec/parser/examples/example1.rb.txt +0 -8
- data/spec/parser/examples/extrafile.c.txt +0 -8
- data/spec/parser/examples/file.c.txt +0 -28
- data/spec/parser/examples/multifile.c.txt +0 -22
- data/spec/parser/examples/namespace.cpp.txt +0 -68
- data/spec/parser/examples/override.c.txt +0 -424
- data/spec/parser/examples/parse_in_order_001.rb.txt +0 -2
- data/spec/parser/examples/parse_in_order_002.rb.txt +0 -2
- data/spec/parser/examples/tag_handler_001.rb.txt +0 -8
- data/spec/parser/ruby/ast_node_spec.rb +0 -33
- data/spec/parser/ruby/legacy/statement_list_spec.rb +0 -299
- data/spec/parser/ruby/legacy/token_list_spec.rb +0 -79
- data/spec/parser/ruby/ruby_parser_spec.rb +0 -508
- data/spec/parser/ruby/token_resolver_spec.rb +0 -165
- data/spec/parser/source_parser_spec.rb +0 -727
- data/spec/parser/tag_parsing_spec.rb +0 -17
- data/spec/rake/yardoc_task_spec.rb +0 -118
- data/spec/registry_spec.rb +0 -463
- data/spec/registry_store_spec.rb +0 -327
- data/spec/rubygems/doc_manager_spec.rb +0 -112
- data/spec/serializers/data/serialized_yardoc/checksums +0 -1
- data/spec/serializers/data/serialized_yardoc/objects/Foo/bar_i.dat +0 -0
- data/spec/serializers/data/serialized_yardoc/objects/Foo/baz_i.dat +0 -0
- data/spec/serializers/data/serialized_yardoc/objects/Foo.dat +0 -0
- data/spec/serializers/data/serialized_yardoc/objects/root.dat +0 -0
- data/spec/serializers/data/serialized_yardoc/proxy_types +0 -2
- data/spec/serializers/file_system_serializer_spec.rb +0 -145
- data/spec/serializers/spec_helper.rb +0 -2
- data/spec/serializers/yardoc_serializer_spec.rb +0 -78
- data/spec/server/adapter_spec.rb +0 -39
- data/spec/server/commands/base_spec.rb +0 -91
- data/spec/server/commands/library_command_spec.rb +0 -39
- data/spec/server/doc_server_helper_spec.rb +0 -72
- data/spec/server/doc_server_serializer_spec.rb +0 -60
- data/spec/server/rack_adapter_spec.rb +0 -21
- data/spec/server/router_spec.rb +0 -123
- data/spec/server/spec_helper.rb +0 -22
- data/spec/server/static_caching_spec.rb +0 -47
- data/spec/server/webrick_servlet_spec.rb +0 -20
- data/spec/server_spec.rb +0 -19
- data/spec/spec_helper.rb +0 -212
- data/spec/tags/default_factory_spec.rb +0 -168
- data/spec/tags/default_tag_spec.rb +0 -11
- data/spec/tags/directives_spec.rb +0 -463
- data/spec/tags/library_spec.rb +0 -48
- data/spec/tags/overload_tag_spec.rb +0 -53
- data/spec/tags/ref_tag_list_spec.rb +0 -53
- data/spec/tags/types_explainer_spec.rb +0 -203
- data/spec/templates/class_spec.rb +0 -45
- data/spec/templates/constant_spec.rb +0 -41
- data/spec/templates/engine_spec.rb +0 -131
- data/spec/templates/examples/class001.html +0 -308
- data/spec/templates/examples/class001.txt +0 -36
- data/spec/templates/examples/class002.html +0 -39
- data/spec/templates/examples/constant001.txt +0 -25
- data/spec/templates/examples/constant002.txt +0 -7
- data/spec/templates/examples/constant003.txt +0 -11
- data/spec/templates/examples/method001.html +0 -137
- data/spec/templates/examples/method001.txt +0 -35
- data/spec/templates/examples/method002.html +0 -91
- data/spec/templates/examples/method002.txt +0 -20
- data/spec/templates/examples/method003.html +0 -165
- data/spec/templates/examples/method003.txt +0 -45
- data/spec/templates/examples/method004.html +0 -48
- data/spec/templates/examples/method004.txt +0 -10
- data/spec/templates/examples/method005.html +0 -105
- data/spec/templates/examples/method005.txt +0 -33
- data/spec/templates/examples/method006.html +0 -108
- data/spec/templates/examples/method006.txt +0 -20
- data/spec/templates/examples/module001.dot +0 -33
- data/spec/templates/examples/module001.html +0 -833
- data/spec/templates/examples/module001.txt +0 -33
- data/spec/templates/examples/module002.html +0 -341
- data/spec/templates/examples/module003.html +0 -202
- data/spec/templates/examples/module004.html +0 -394
- data/spec/templates/examples/module005.html +0 -82
- data/spec/templates/examples/tag001.txt +0 -82
- data/spec/templates/helpers/base_helper_spec.rb +0 -171
- data/spec/templates/helpers/html_helper_spec.rb +0 -687
- data/spec/templates/helpers/html_syntax_highlight_helper_spec.rb +0 -65
- data/spec/templates/helpers/markup/rdoc_markup_spec.rb +0 -84
- data/spec/templates/helpers/markup_helper_spec.rb +0 -136
- data/spec/templates/helpers/method_helper_spec.rb +0 -107
- data/spec/templates/helpers/module_helper_spec.rb +0 -35
- data/spec/templates/helpers/shared_signature_examples.rb +0 -126
- data/spec/templates/helpers/text_helper_spec.rb +0 -65
- data/spec/templates/markup_processor_integrations/asciidoctor_spec.rb +0 -60
- data/spec/templates/markup_processor_integrations/integration_spec_helper.rb +0 -46
- data/spec/templates/markup_processor_integrations/rdoc_markdown_spec.rb +0 -59
- data/spec/templates/markup_processor_integrations/rdoc_spec.rb +0 -39
- data/spec/templates/markup_processor_integrations/redcarpet_spec.rb +0 -59
- data/spec/templates/markup_processor_integrations/redcloth_spec.rb +0 -48
- data/spec/templates/method_spec.rb +0 -118
- data/spec/templates/module_spec.rb +0 -203
- data/spec/templates/onefile_spec.rb +0 -66
- data/spec/templates/section_spec.rb +0 -144
- data/spec/templates/spec_helper.rb +0 -76
- data/spec/templates/tag_spec.rb +0 -52
- data/spec/templates/template_spec.rb +0 -410
- data/spec/verifier_spec.rb +0 -106
@@ -1,394 +0,0 @@
|
|
1
|
-
<h1>Class: A
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
</h1>
|
6
|
-
<div class="box_info">
|
7
|
-
|
8
|
-
<dl>
|
9
|
-
<dt>Inherits:</dt>
|
10
|
-
<dd>
|
11
|
-
<span class="inheritName">Object</span>
|
12
|
-
|
13
|
-
<ul class="fullTree">
|
14
|
-
<li>Object</li>
|
15
|
-
|
16
|
-
<li class="next">A</li>
|
17
|
-
|
18
|
-
</ul>
|
19
|
-
<a href="#" class="inheritanceTree">show all</a>
|
20
|
-
|
21
|
-
</dd>
|
22
|
-
</dl>
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
<dl>
|
28
|
-
<dt>Extended by:</dt>
|
29
|
-
<dd>Bar</dd>
|
30
|
-
</dl>
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
<dl>
|
35
|
-
<dt>Includes:</dt>
|
36
|
-
<dd>BarFooBar, Baz::ABC, Baz::XYZ, Foo</dd>
|
37
|
-
</dl>
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
<dl>
|
45
|
-
<dt>Defined in:</dt>
|
46
|
-
<dd>(stdin)</dd>
|
47
|
-
</dl>
|
48
|
-
|
49
|
-
</div>
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
<h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
|
56
|
-
<ul class="summary">
|
57
|
-
|
58
|
-
<li class="public ">
|
59
|
-
<span class="summary_signature">
|
60
|
-
|
61
|
-
<a title="#bar_attr (instance method)">#<strong>bar_attr</strong> </a>
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
</span>
|
66
|
-
|
67
|
-
<span class="note title not_defined_here">
|
68
|
-
included
|
69
|
-
from Foo
|
70
|
-
</span>
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
<span class="summary_desc"><div class='inline'>Docs for bar_attr.</div></span>
|
84
|
-
|
85
|
-
</li>
|
86
|
-
|
87
|
-
|
88
|
-
</ul>
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
<h2>
|
95
|
-
Booya
|
96
|
-
<small><a href="#" class="summary_toggle">collapse</a></small>
|
97
|
-
</h2>
|
98
|
-
|
99
|
-
<ul class="summary">
|
100
|
-
|
101
|
-
<li class="public ">
|
102
|
-
<span class="summary_signature">
|
103
|
-
|
104
|
-
<a title="#baz (class method)">.<strong>baz</strong> </a>
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
</span>
|
109
|
-
|
110
|
-
<span class="note title not_defined_here">
|
111
|
-
extended
|
112
|
-
from Bar
|
113
|
-
</span>
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
<span class="summary_desc"><div class='inline'>Docs for baz in Booya group.</div></span>
|
124
|
-
|
125
|
-
</li>
|
126
|
-
|
127
|
-
|
128
|
-
<li class="public ">
|
129
|
-
<span class="summary_signature">
|
130
|
-
|
131
|
-
<a title="#baz_abc (instance method)">#<strong>baz_abc</strong> </a>
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
</span>
|
136
|
-
|
137
|
-
<span class="note title not_defined_here">
|
138
|
-
included
|
139
|
-
from Baz::ABC
|
140
|
-
</span>
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
151
|
-
|
152
|
-
</li>
|
153
|
-
|
154
|
-
|
155
|
-
</ul>
|
156
|
-
|
157
|
-
<h2>
|
158
|
-
Instance Method Summary
|
159
|
-
<small><a href="#" class="summary_toggle">collapse</a></small>
|
160
|
-
</h2>
|
161
|
-
|
162
|
-
<ul class="summary">
|
163
|
-
|
164
|
-
<li class="public ">
|
165
|
-
<span class="summary_signature">
|
166
|
-
|
167
|
-
<a title="#foo (instance method)">#<strong>foo</strong> </a>
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
</span>
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
<span class="summary_desc"><div class='inline'>This method is in A.</div></span>
|
182
|
-
|
183
|
-
</li>
|
184
|
-
|
185
|
-
|
186
|
-
<li class="public ">
|
187
|
-
<span class="summary_signature">
|
188
|
-
|
189
|
-
<a title="#xyz (instance method)">#<strong>xyz</strong> </a>
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
</span>
|
194
|
-
|
195
|
-
<span class="note title not_defined_here">
|
196
|
-
included
|
197
|
-
from Foo
|
198
|
-
</span>
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
<span class="summary_desc"><div class='inline'>Docs for xyz.</div></span>
|
209
|
-
|
210
|
-
</li>
|
211
|
-
|
212
|
-
|
213
|
-
</ul>
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
<h3 class="inherited">Methods included from Baz::XYZ</h3>
|
230
|
-
<p class="inherited">#baz_xyz</p>
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
<h3 class="inherited">Methods included from BarFooBar</h3>
|
241
|
-
<p class="inherited">#bar_foo_bar</p>
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
<div id="instance_attr_details" class="attr_details">
|
246
|
-
<h2>Instance Attribute Details</h2>
|
247
|
-
|
248
|
-
|
249
|
-
<span id="bar_attr=-instance_method"></span>
|
250
|
-
<div class="method_details first">
|
251
|
-
<h3 class="signature first" id="bar_attr-instance_method">
|
252
|
-
|
253
|
-
#<strong>bar_attr</strong>
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
<span class="not_defined_here">
|
260
|
-
Originally defined in module
|
261
|
-
Foo
|
262
|
-
</span>
|
263
|
-
|
264
|
-
</h3><div class="docstring">
|
265
|
-
<div class="discussion">
|
266
|
-
Docs for bar_attr
|
267
|
-
|
268
|
-
</div>
|
269
|
-
</div>
|
270
|
-
<div class="tags">
|
271
|
-
|
272
|
-
|
273
|
-
</div>
|
274
|
-
</div>
|
275
|
-
|
276
|
-
</div>
|
277
|
-
|
278
|
-
|
279
|
-
<div id="class_method_details" class="method_details_list">
|
280
|
-
<h2>Class Method Details</h2>
|
281
|
-
|
282
|
-
|
283
|
-
<div class="method_details first">
|
284
|
-
<h3 class="signature first" id="baz-class_method">
|
285
|
-
|
286
|
-
.<strong>baz</strong>
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
<span class="not_defined_here">
|
293
|
-
Originally defined in module
|
294
|
-
Bar
|
295
|
-
</span>
|
296
|
-
|
297
|
-
</h3><div class="docstring">
|
298
|
-
<div class="discussion">
|
299
|
-
Docs for baz in Booya group
|
300
|
-
|
301
|
-
</div>
|
302
|
-
</div>
|
303
|
-
<div class="tags">
|
304
|
-
|
305
|
-
|
306
|
-
</div>
|
307
|
-
</div>
|
308
|
-
|
309
|
-
</div>
|
310
|
-
|
311
|
-
<div id="instance_method_details" class="method_details_list">
|
312
|
-
<h2>Instance Method Details</h2>
|
313
|
-
|
314
|
-
|
315
|
-
<div class="method_details first">
|
316
|
-
<h3 class="signature first" id="baz_abc-instance_method">
|
317
|
-
|
318
|
-
#<strong>baz_abc</strong>
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
<span class="not_defined_here">
|
325
|
-
Originally defined in module
|
326
|
-
Baz::ABC
|
327
|
-
</span>
|
328
|
-
|
329
|
-
</h3>
|
330
|
-
</div>
|
331
|
-
|
332
|
-
<div class="method_details ">
|
333
|
-
<h3 class="signature " id="foo-instance_method">
|
334
|
-
|
335
|
-
#<strong>foo</strong>
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
</h3><div class="docstring">
|
342
|
-
<div class="discussion">
|
343
|
-
This method is in A
|
344
|
-
|
345
|
-
</div>
|
346
|
-
</div>
|
347
|
-
<div class="tags">
|
348
|
-
|
349
|
-
|
350
|
-
</div><table class="source_code">
|
351
|
-
<tr>
|
352
|
-
<td>
|
353
|
-
<pre class="lines">
|
354
|
-
|
355
|
-
|
356
|
-
3</pre>
|
357
|
-
</td>
|
358
|
-
<td>
|
359
|
-
<pre class="code"><span class="info file"># File '(stdin)', line 3</span>
|
360
|
-
|
361
|
-
def foo; end</pre>
|
362
|
-
</td>
|
363
|
-
</tr>
|
364
|
-
</table>
|
365
|
-
</div>
|
366
|
-
|
367
|
-
<div class="method_details ">
|
368
|
-
<h3 class="signature " id="xyz-instance_method">
|
369
|
-
|
370
|
-
#<strong>xyz</strong>
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
<span class="not_defined_here">
|
377
|
-
Originally defined in module
|
378
|
-
Foo
|
379
|
-
</span>
|
380
|
-
|
381
|
-
</h3><div class="docstring">
|
382
|
-
<div class="discussion">
|
383
|
-
Docs for xyz
|
384
|
-
|
385
|
-
</div>
|
386
|
-
</div>
|
387
|
-
<div class="tags">
|
388
|
-
|
389
|
-
|
390
|
-
</div>
|
391
|
-
</div>
|
392
|
-
|
393
|
-
</div>
|
394
|
-
|
@@ -1,82 +0,0 @@
|
|
1
|
-
<h1>Module: A
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
</h1>
|
6
|
-
<div class="box_info">
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
<dl>
|
19
|
-
<dt>Defined in:</dt>
|
20
|
-
<dd>(stdin)</dd>
|
21
|
-
</dl>
|
22
|
-
|
23
|
-
</div>
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
<h2>
|
28
|
-
Foo
|
29
|
-
<small><a href="#" class="constants_summary_toggle">collapse</a></small>
|
30
|
-
</h2>
|
31
|
-
|
32
|
-
<dl class="constants">
|
33
|
-
|
34
|
-
<dt id="FOO-constant" class="">FOO =
|
35
|
-
|
36
|
-
</dt>
|
37
|
-
<dd><pre class="code">1</pre></dd>
|
38
|
-
|
39
|
-
<dt id="BAR-constant" class="deprecated">BAR =
|
40
|
-
<div class="docstring">
|
41
|
-
<div class="discussion">
|
42
|
-
<div class="note deprecated"><strong>Deprecated.</strong> <div class='inline'></div></div>
|
43
|
-
|
44
|
-
|
45
|
-
</div>
|
46
|
-
</div>
|
47
|
-
<div class="tags">
|
48
|
-
|
49
|
-
|
50
|
-
</div>
|
51
|
-
</dt>
|
52
|
-
<dd><pre class="code">2</pre></dd>
|
53
|
-
|
54
|
-
</dl>
|
55
|
-
|
56
|
-
<h2>
|
57
|
-
Bar
|
58
|
-
<small><a href="#" class="constants_summary_toggle">collapse</a></small>
|
59
|
-
</h2>
|
60
|
-
|
61
|
-
<dl class="constants">
|
62
|
-
|
63
|
-
<dt id="BAZ-constant" class="">BAZ =
|
64
|
-
|
65
|
-
</dt>
|
66
|
-
<dd><pre class="code">3</pre></dd>
|
67
|
-
|
68
|
-
</dl>
|
69
|
-
|
70
|
-
<h2>
|
71
|
-
Constant Summary
|
72
|
-
<small><a href="#" class="constants_summary_toggle">collapse</a></small>
|
73
|
-
</h2>
|
74
|
-
|
75
|
-
<dl class="constants">
|
76
|
-
|
77
|
-
<dt id="WORLD-constant" class="">WORLD =
|
78
|
-
|
79
|
-
</dt>
|
80
|
-
<dd><pre class="code">4</pre></dd>
|
81
|
-
|
82
|
-
</dl>
|
@@ -1,82 +0,0 @@
|
|
1
|
-
------------------------------------------------------------- Method: #m
|
2
|
-
(Defined in: (stdin))
|
3
|
-
|
4
|
-
root.m(opts = {}) {|a| ... } -> String
|
5
|
-
------------------------------------------------------------------------
|
6
|
-
|
7
|
-
Deprecated. for great justice
|
8
|
-
|
9
|
-
Abstract. override me
|
10
|
-
|
11
|
-
Comments
|
12
|
-
|
13
|
-
Examples:
|
14
|
-
---------
|
15
|
-
|
16
|
-
# Wash your car
|
17
|
-
car.wash
|
18
|
-
|
19
|
-
# To kill a mockingbird
|
20
|
-
a = String.new
|
21
|
-
flip(a.reverse)
|
22
|
-
|
23
|
-
Parameters:
|
24
|
-
-----------
|
25
|
-
|
26
|
-
(Hash) opts - the options
|
27
|
-
|
28
|
-
Options Hash (opts):
|
29
|
-
--------------------
|
30
|
-
|
31
|
-
(Object) :key - default: '' - hello
|
32
|
-
|
33
|
-
(Object) :key2 - default: X - hello
|
34
|
-
|
35
|
-
Yields:
|
36
|
-
-------
|
37
|
-
|
38
|
-
- a block
|
39
|
-
|
40
|
-
Yield Parameters:
|
41
|
-
-----------------
|
42
|
-
|
43
|
-
(String) a - a value
|
44
|
-
|
45
|
-
Yield Returns:
|
46
|
-
--------------
|
47
|
-
|
48
|
-
(Hash) - a hash
|
49
|
-
|
50
|
-
Returns:
|
51
|
-
--------
|
52
|
-
|
53
|
-
(String) - the result
|
54
|
-
|
55
|
-
Raises:
|
56
|
-
-------
|
57
|
-
|
58
|
-
(Exception) - Exception class
|
59
|
-
|
60
|
-
See Also:
|
61
|
-
---------
|
62
|
-
|
63
|
-
- A
|
64
|
-
- http://url.com
|
65
|
-
- http://url.com - Example
|
66
|
-
|
67
|
-
Author:
|
68
|
-
-------
|
69
|
-
|
70
|
-
Name
|
71
|
-
|
72
|
-
Since:
|
73
|
-
------
|
74
|
-
|
75
|
-
1.0
|
76
|
-
|
77
|
-
Version:
|
78
|
-
--------
|
79
|
-
|
80
|
-
1.0
|
81
|
-
|
82
|
-
|
@@ -1,171 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
RSpec.describe YARD::Templates::Helpers::BaseHelper do
|
4
|
-
include YARD::Templates::Helpers::BaseHelper
|
5
|
-
|
6
|
-
describe "#run_verifier" do
|
7
|
-
it "runs verifier proc against list if provided" do
|
8
|
-
mock = Verifier.new
|
9
|
-
expect(mock).to receive(:call).with(1)
|
10
|
-
expect(mock).to receive(:call).with(2)
|
11
|
-
expect(mock).to receive(:call).with(3)
|
12
|
-
expect(self).to receive(:options).at_least(1).times.and_return(Options.new.update(:verifier => mock))
|
13
|
-
run_verifier [1, 2, 3]
|
14
|
-
end
|
15
|
-
|
16
|
-
it "prunes list if lambda returns false and only false" do
|
17
|
-
mock = Verifier.new
|
18
|
-
expect(self).to receive(:options).at_least(1).times.and_return(Options.new.update(:verifier => mock))
|
19
|
-
expect(mock).to receive(:call).with(1).and_return(false)
|
20
|
-
expect(mock).to receive(:call).with(2).and_return(true)
|
21
|
-
expect(mock).to receive(:call).with(3).and_return(nil)
|
22
|
-
expect(mock).to receive(:call).with(4).and_return("value")
|
23
|
-
expect(run_verifier([1, 2, 3, 4])).to eq [2, 3, 4]
|
24
|
-
end
|
25
|
-
|
26
|
-
it "returns list if no verifier exists" do
|
27
|
-
expect(self).to receive(:options).at_least(1).times.and_return(Options.new)
|
28
|
-
expect(run_verifier([1, 2, 3])).to eq [1, 2, 3]
|
29
|
-
end
|
30
|
-
end
|
31
|
-
|
32
|
-
describe "#h" do
|
33
|
-
it "returns just the text" do
|
34
|
-
expect(h("hello world")).to eq "hello world"
|
35
|
-
expect(h(nil)).to eq nil
|
36
|
-
end
|
37
|
-
end
|
38
|
-
|
39
|
-
describe "#link_object" do
|
40
|
-
it "returns the title if provided" do
|
41
|
-
expect(link_object(1, "title")).to eq "title"
|
42
|
-
expect(link_object(Registry.root, "title")).to eq "title"
|
43
|
-
end
|
44
|
-
|
45
|
-
it "returns a path if argument is a Proxy or object" do
|
46
|
-
expect(link_object(Registry.root)).to eq "Top Level Namespace"
|
47
|
-
expect(link_object(P("Array"))).to eq "Array"
|
48
|
-
end
|
49
|
-
|
50
|
-
it "returns path of Proxified object if argument is a String or Symbol" do
|
51
|
-
expect(link_object("Array")).to eq "Array"
|
52
|
-
expect(link_object(:"A::B")).to eq "A::B"
|
53
|
-
end
|
54
|
-
|
55
|
-
it "returns the argument if not an object, proxy, String or Symbol" do
|
56
|
-
expect(link_object(1)).to eq 1
|
57
|
-
end
|
58
|
-
end
|
59
|
-
|
60
|
-
describe "#link_url" do
|
61
|
-
it "returns the URL" do
|
62
|
-
expect(link_url("http://url")).to eq "http://url"
|
63
|
-
end
|
64
|
-
end
|
65
|
-
|
66
|
-
describe "#linkify" do
|
67
|
-
let(:object) { Registry.root }
|
68
|
-
# before do
|
69
|
-
# stub!(:object).and_return(Registry.root)
|
70
|
-
# end
|
71
|
-
|
72
|
-
it "calls #link_url for mailto: links" do
|
73
|
-
expect(self).to receive(:link_url)
|
74
|
-
linkify("mailto:steve@example.com")
|
75
|
-
end
|
76
|
-
|
77
|
-
it "calls #link_url for URL schemes (http://)" do
|
78
|
-
expect(self).to receive(:link_url)
|
79
|
-
linkify("http://example.com")
|
80
|
-
end
|
81
|
-
|
82
|
-
it "calls #link_file for file: links" do
|
83
|
-
expect(self).to receive(:link_file).with('Filename', nil, 'anchor')
|
84
|
-
linkify("file:Filename#anchor")
|
85
|
-
end
|
86
|
-
|
87
|
-
it "passes off to #link_object if argument is an object" do
|
88
|
-
obj = CodeObjects::NamespaceObject.new(nil, :YARD)
|
89
|
-
expect(self).to receive(:link_object).with(obj)
|
90
|
-
linkify obj
|
91
|
-
end
|
92
|
-
|
93
|
-
it "returns empty string and warn if object does not exist" do
|
94
|
-
expect(log).to receive(:warn).with(/Cannot find object .* for inclusion/)
|
95
|
-
expect(linkify('include:NotExist')).to eq ''
|
96
|
-
end
|
97
|
-
|
98
|
-
it "passes off to #link_url if argument is recognized as a URL" do
|
99
|
-
url = "http://yardoc.org/"
|
100
|
-
expect(self).to receive(:link_url).with(url, nil, :target => '_parent')
|
101
|
-
linkify url
|
102
|
-
end
|
103
|
-
|
104
|
-
it "calls #link_include_object for include:ObjectName" do
|
105
|
-
obj = CodeObjects::NamespaceObject.new(:root, :Foo)
|
106
|
-
expect(self).to receive(:link_include_object).with(obj)
|
107
|
-
linkify 'include:Foo'
|
108
|
-
end
|
109
|
-
|
110
|
-
it "calls #link_include_file for include:file:path/to/file" do
|
111
|
-
expect(File).to receive(:file?).with('path/to/file').and_return(true)
|
112
|
-
expect(File).to receive(:read).with('path/to/file').and_return('FOO')
|
113
|
-
expect(linkify('include:file:path/to/file')).to eq 'FOO'
|
114
|
-
end
|
115
|
-
|
116
|
-
it "does not allow include:file for path above pwd" do
|
117
|
-
expect(log).to receive(:warn).with("Cannot include file from path `a/b/../../../../file'")
|
118
|
-
expect(linkify('include:file:a/b/../../../../file')).to eq ''
|
119
|
-
end
|
120
|
-
|
121
|
-
it "warns if include:file:path does not exist" do
|
122
|
-
expect(log).to receive(:warn).with(/Cannot find file .+ for inclusion/)
|
123
|
-
expect(linkify('include:file:notexist')).to eq ''
|
124
|
-
end
|
125
|
-
end
|
126
|
-
|
127
|
-
describe "#format_types" do
|
128
|
-
it "returns the list of types separated by commas surrounded by brackets" do
|
129
|
-
expect(format_types(['a', 'b', 'c'])).to eq '(a, b, c)'
|
130
|
-
end
|
131
|
-
|
132
|
-
it "returns the list of types without brackets if brackets=false" do
|
133
|
-
expect(format_types(['a', 'b', 'c'], false)).to eq 'a, b, c'
|
134
|
-
end
|
135
|
-
|
136
|
-
it "returns an empty string if list is empty or nil" do
|
137
|
-
expect(format_types(nil)).to eq ""
|
138
|
-
expect(format_types([])).to eq ""
|
139
|
-
end
|
140
|
-
end
|
141
|
-
|
142
|
-
describe "#format_object_type" do
|
143
|
-
it "returns Exception if type is Exception" do
|
144
|
-
obj = double(:object, :is_exception? => true)
|
145
|
-
allow(obj).to receive(:is_a?) {|arg| arg == YARD::CodeObjects::ClassObject }
|
146
|
-
expect(format_object_type(obj)).to eq "Exception"
|
147
|
-
end
|
148
|
-
|
149
|
-
it "returns Class if type is Class" do
|
150
|
-
obj = double(:object, :is_exception? => false)
|
151
|
-
allow(obj).to receive(:is_a?) {|arg| arg == YARD::CodeObjects::ClassObject }
|
152
|
-
expect(format_object_type(obj)).to eq "Class"
|
153
|
-
end
|
154
|
-
|
155
|
-
it "returns object type in other cases" do
|
156
|
-
obj = double(:object, :type => "value")
|
157
|
-
expect(format_object_type(obj)).to eq "Value"
|
158
|
-
end
|
159
|
-
end
|
160
|
-
|
161
|
-
describe "#format_object_title" do
|
162
|
-
it "returns Top Level Namespace for root object" do
|
163
|
-
expect(format_object_title(Registry.root)).to eq "Top Level Namespace"
|
164
|
-
end
|
165
|
-
|
166
|
-
it "returns 'type: title' in other cases" do
|
167
|
-
obj = double(:object, :type => :class, :title => "A::B::C")
|
168
|
-
expect(format_object_title(obj)).to eq "Class: A::B::C"
|
169
|
-
end
|
170
|
-
end
|
171
|
-
end
|