lsegal / yard

YARD is a Ruby Documentation tool. The Y stands for "Yay!"
http://yardoc.org
MIT License
1.92k stars 394 forks source link

Support Ruby 3 inline attribute visibility #1541

Open theodorton opened 3 months ago

theodorton commented 3 months ago

See https://redmine.ruby-lang.org/issues/17314

Description

Currently attributes defined with:

private attr_accessor :foo
protected attr_accessor :bar

Will be displayed as public attributes in the documentation.

These should be considered private/protected and not be included in the documentation.

When generating documentation, this warning is show:

[warn]: in YARD::Handlers::Ruby::VisibilityHandler: Undocumentable statement, cannot determine method name
    in file ...:

    1: private attr_accessor :foo

Completed Tasks