You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sorry for the late reply on this, but yes, YARD does not quite support arbitrary visibility modifier prefixes quite yet. It's a little difficult to implement this (though not impossible) because of the informality of what can be used as a method declaration modifier, as well as, to some degree, the order of modifiers.
The presumption would be to special case public/private/protected, though this would likely be an incomplete implementation. This is, however, what we do for methods, and would need to be ported over to work for attributes.
Does YARD not support
private attr_*
syntax?With a
private attr_*
syntax introduced in Ruby 3.0 (https://bugs.ruby-lang.org/issues/17314);yard doc
displays a warning message;and private attributes defined with the syntax are inappropriately documented:
Steps to reproduce
Make Gemfile and lib/sample.rb:
Gemfile
lib/sample.rb
Run the following command to generate documents and to open a server.
Open browser to http://localhost:8808/docs/Sample.
Environment details
OS: Ubuntu 20.02 (WSL2)
Ruby version (
ruby -v
):ruby 3.1.3p185 (2022-11-24 revision 1a6b16756e) [x86_64-linux]
ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c5) [x86_64-linux]
YARD version (
bundle exec yard -v
):yard 0.9.28
Relevant software dependency/versions:
Bundler (
bundle version
):Bundler version 2.3.26 (2022-12-29 commit unknown)
(Ruby 3.1.3)Bundler version 2.2.33 (2022-12-29 commit unknown)
(Ruby 3.0.5)Ruby are installed via rbenv
1.2.0-14-gc6cc0a1
.I have read the Contributing Guide.
The text was updated successfully, but these errors were encountered: