|
463 | 463 | # |
464 | 464 | # - Specifies that the defined object should not be documented. |
465 | 465 | # |
466 | | -# - For method definitions in C code, it must be placed before the |
467 | | -# implementation: |
| 466 | +# - For a method definition in C code, it the directive must be in the comment line |
| 467 | +# immediately preceding the definition: |
468 | 468 | # |
469 | 469 | # /* :nodoc: */ |
470 | 470 | # static VALUE |
|
473 | 473 | # return self; |
474 | 474 | # } |
475 | 475 | # |
476 | | -# Note that this directive has <em>no effect at all</em> at method |
477 | | -# definition places. E.g., |
| 476 | +# Note that this directive has <em>no effect at all</em> |
| 477 | +# when placed at the method declaration: |
478 | 478 | # |
479 | 479 | # /* :nodoc: */ |
480 | 480 | # rb_define_method(cMyClass, "do_something", something_func, 0); |
|
483 | 483 | # Therefore, +do_something+ method will be reported as "undocumented" |
484 | 484 | # unless that method or function is documented elsewhere. |
485 | 485 | # |
486 | | -# - For constant definitions in C code, this directive <em>can not work</em> |
487 | | -# because there is no "implementation" place for constants. |
| 486 | +# - For a constant definition in C code, this directive <em>can not work</em> |
| 487 | +# because there is no "implementation" place for a constant. |
488 | 488 | # |
489 | 489 | # - <tt># :nodoc: all</tt>: |
490 | 490 | # |
|
497 | 497 | # |
498 | 498 | # - Appended to a line of code |
499 | 499 | # that defines a class, module, method, alias, constant, or attribute. |
500 | | -# - Specifies the defined object should be documented, even if otherwise |
| 500 | +# - Specifies the defined object should be documented, even if it otherwise |
501 | 501 | # would not be documented. |
502 | 502 | # |
503 | 503 | # - <tt># :notnew:</tt> (aliased as <tt>:not_new:</tt> and <tt>:not-new:</tt>): |
|
1209 | 1209 | # |
1210 | 1210 | class RDoc::MarkupReference |
1211 | 1211 |
|
1212 | | - # example class |
| 1212 | + # Example class. |
1213 | 1213 | class DummyClass; end |
1214 | 1214 |
|
1215 | | - # example module |
| 1215 | + # Example module. |
1216 | 1216 | module DummyModule; end |
1217 | 1217 |
|
1218 | | - # example singleton method |
| 1218 | + # Example singleton method. |
1219 | 1219 | def self.dummy_singleton_method(foo, bar); end |
1220 | 1220 |
|
1221 | | - # example instance method |
| 1221 | + # Example instance method. |
1222 | 1222 | def dummy_instance_method(foo, bar); end; |
1223 | 1223 |
|
1224 | 1224 | alias dummy_instance_alias dummy_instance_method |
1225 | 1225 |
|
1226 | | - # example attribute |
| 1226 | + # Example attribute. |
1227 | 1227 | attr_accessor :dummy_attribute |
1228 | 1228 |
|
1229 | 1229 | alias dummy_attribute_alias dummy_attribute |
1230 | 1230 |
|
1231 | | - # example constant |
| 1231 | + # Example constant. |
1232 | 1232 | DUMMY_CONSTANT = '' |
1233 | 1233 |
|
1234 | 1234 | # :call-seq: |
|
0 commit comments