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
A class/module page documents its attributes in a section separate from that for its other instance methods. The TOC at the left links to the non-attribute methods, but not to the attribute-generated methods.
Internally, there seems to be no distinction between non-attribute methods and attribute-generated methods. Over at stackoverflow.com, queries about determining which way a method was defined go unanswered.
So my question is this: If an attribute-generated method is a full-fledged method, indistinquishable from a non-attribute method, should it not be in the left TOC?
The text was updated successfully, but these errors were encountered:
@hsbt Is this an intended behavior? We can add "attributes" header to the TOC that might provide better user experiences.
If we decide to add "attributes" header to TOC, I can implement it (since I did some research and found a place to modify).
(Btw I'm asking this to hsbt because he's on the authors list in gemspec)
@BurdetteLamar AFAIK, using defined? returns the same method value for methods defined with def and attr_reader, although the internal implementations are different (for example, TracePoint handles them differently).
From users' perspective, they are all methods and Indistinguishable, so putting attributes in method list makes sense to me.
As a reference, YARD displays attribute list separately from method list (see https://www.rubydoc.info/gems/alba/Alba/Resource as a concrete example)
A class/module page documents its attributes in a section separate from that for its other instance methods. The TOC at the left links to the non-attribute methods, but not to the attribute-generated methods.
Internally, there seems to be no distinction between non-attribute methods and attribute-generated methods. Over at stackoverflow.com, queries about determining which way a method was defined go unanswered.
So my question is this: If an attribute-generated method is a full-fledged method, indistinquishable from a non-attribute method, should it not be in the left TOC?
The text was updated successfully, but these errors were encountered: