-
Notifications
You must be signed in to change notification settings - Fork 440
New issue
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
Alias for attribute causes aliasing method to appear in Attributes section #1286
Comments
Reproduced this behavior on v6.11.0. @gemmaro Can you help me understand what you expect to see? It sounds like you want to completely omit mentioning the alias, but I think there's value in mentioning it as an alias, perhaps similar to how rdoc renders non-attribute methods: WDYT? |
@flavorjones I agree that having links between aliasing methods and aliased attributes is beneficial. Here's what I expect to see, based on the Darkfish theme (though it may vary in other themes):
For example, consider the following class Foo
# Some document comment about bar.
attr :bar
# Some document comment about baz.
alias baz bar
# Some document comment about qux.
def qux; end
# Some document comment about quux.
alias quux qux
end Currently, RDoc generates: What I expect to see is: manually edited diff for
|
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
:When running
rdoc
, the documentation for theFoo
class shows:This behavior is misleading, as
baz
is not a separate attribute but an alias method forbar
method (and attribute). It would be beneficial to adjust the documentation generation to prevent alias methods from appearing in the attributes section.The text was updated successfully, but these errors were encountered: