Skip to content

Alias for attribute causes aliasing method to appear in Attributes section #1286

@gemmaro

Description

@gemmaro

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:

Image

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions