Alias for attribute causes aliasing method to appear in Attributes section
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 930
- Forks
- 465
- Avg merge
- 3d 10h
- Merged PRs (30d)
- 27
Description
When defining an alias for an attribute in a class, the aliasing method is incorrectly displayed in the attributes section of the generated documentation.
For example, consider the following code in lib/foo.rb:
class Foo
attr :bar
alias baz bar
end
When running rdoc, the documentation for the Foo class shows:
This behavior is misleading, as baz is not a separate attribute but an alias method for bar method (and attribute). It would be beneficial to adjust the documentation generation to prevent alias methods from appearing in the attributes section.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the RDoc behavior described for lib/foo.rb and run rdoc on the example containing attr :bar and alias baz bar. Inspect the generated Foo documentation; done means baz no longer appears in the attributes section while bar remains documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- documentation
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100