We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@!scope class
attr_*
If I add @!scope class for a attr_* call (such as attr_reader :test), there is an error.
attr_reader :test
Discussion context: #1581.
Write these to lib/test.rb:
lib/test.rb
# A test class. class Test # @!scope class # A test attribute. attr_reader :test end
Then run yard doc --debug.
yard doc --debug
[debug]: Parsing ["{lib,app}/**/*.rb", "ext/**/*.{c,cc,cxx,cpp,rb}"] with `ruby` parser [debug]: Parsing lib/test.rb [debug]: Serializing to .yardoc/objects/root.dat [debug]: Re-generating object ... [debug]: Re-generating object Test... [debug]: Generating asset js/jquery.js [debug]: Serializing to doc/js/jquery.js [debug]: Generating asset js/app.js [debug]: Serializing to doc/js/app.js [debug]: Generating asset js/full_list.js [debug]: Serializing to doc/js/full_list.js [debug]: Generating asset css/style.css [debug]: Serializing to doc/css/style.css [debug]: Generating asset css/common.css [debug]: Serializing to doc/css/common.css [debug]: Generating asset css/full_list.css [debug]: Serializing to doc/css/full_list.css [debug]: Generating asset class_list.html [debug]: Serializing to doc/class_list.html [debug]: Generating asset method_list.html [debug]: Serializing to doc/method_list.html [debug]: Generating asset file_list.html [debug]: Serializing to doc/file_list.html [debug]: Generating asset frames.html [debug]: Serializing to doc/frames.html [debug]: Serializing to doc/index.html [debug]: Serializing to doc/_index.html [debug]: Serializing to doc/top-level-namespace.html [error]: Exception occurred while generating 'Test.html' [error]: NoMethodError: undefined method `[]' for nil [error]: Stack trace: /home/ulysses/.local/share/gem/ruby/3.3.0/gems/yard-0.9.37/templates/default/module/html/attribute_details.erb:8:in `block (2 levels) in _erb_cache_24' /home/ulysses/.local/share/gem/ruby/3.3.0/gems/yard-0.9.37/templates/default/module/html/attribute_details.erb:6:in `each' /home/ulysses/.local/share/gem/ruby/3.3.0/gems/yard-0.9.37/templates/default/module/html/attribute_details.erb:6:in `each_with_index' /home/ulysses/.local/share/gem/ruby/3.3.0/gems/yard-0.9.37/templates/default/module/html/attribute_details.erb:6:in `block in _erb_cache_24' /home/ulysses/.local/share/gem/ruby/3.3.0/gems/yard-0.9.37/templates/default/module/setup.rb:155:in `block in scopes' /home/ulysses/.local/share/gem/ruby/3.3.0/gems/yard-0.9.37/templates/default/module/setup.rb:153:in `each' Files: 1 Modules: 0 ( 0 undocumented) Classes: 1 ( 0 undocumented) Constants: 0 ( 0 undocumented) Attributes: 0 ( 0 undocumented) Methods: 1 ( 0 undocumented) 100.00% documented
Should be equivalent to what this would do:
# A test class. class Test # @!scope class # @!attribute [r] test # A test attribute. end
ruby -v
yard -v
I have read the Contributing Guide.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
If I add
@!scope class
for aattr_*
call (such asattr_reader :test
), there is an error.Discussion context: #1581.
Steps to reproduce
Write these to
lib/test.rb
:Then run
yard doc --debug
.Actual Output
Expected Output
Should be equivalent to what this would do:
Environment details:
ruby -v
): 3.3.4yard -v
): 0.9.37I have read the Contributing Guide.
The text was updated successfully, but these errors were encountered: