ruby/lib/rdoc/generator
Mike Dalessio 0b38e18488 [ruby/rdoc] feature: Render mixed-in methods and constants with
`--embed-mixins`
(https://github.com/ruby/rdoc/pull/842)

* Embed mixed-in methods and constants with `--embed-mixins`

When `--embed-mixins` option is set:

- methods from an `extend`ed module are documented as singleton methods
- attrs from an `extend`ed module are documented as class attributes
- methods from an `include`ed module are documented as instance methods
- attrs from an `include`ed module are documented as instance attributes
- constants from an `include`ed module are documented

Sections are created when needed, and Darkfish's template annotates
each of these mixed-in CodeObjects. We also respect the mixin methods'
visibility.

This feature is inspired by Yard's option of the same name.

* Add comment to document why we set object visibility

Co-authored-by: Stan Lo <stan001212@gmail.com>

* Add the mixin_from attribute to CodeObject's initializer

* Add test coverage for private mixed-in attributes.

---------

481c2ce660

Co-authored-by: Stan Lo <stan001212@gmail.com>
2024-10-17 20:40:34 +00:00
..
pot [ruby/rdoc] Improve rubocop setup 2024-07-17 20:43:08 +00:00
template [ruby/rdoc] feature: Render mixed-in methods and constants with 2024-10-17 20:40:34 +00:00
darkfish.rb [ruby/rdoc] Generate meta tags based on page's content 2024-10-15 22:59:33 +00:00
json_index.rb [ruby/rdoc] Use flat_map for better performance 2023-06-14 23:47:25 +00:00
markup.rb [ruby/rdoc] Auto-correct trailing new lines 2023-06-03 01:42:29 +00:00
pot.rb [ruby/rdoc] [DOC] nodoc for probably internal methods 2023-12-16 00:26:39 +09:00
ri.rb [ruby/rdoc] Auto-correct trailing new lines 2023-06-03 01:42:29 +00:00