-
-
Notifications
You must be signed in to change notification settings - Fork 397
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
Attr_accessor documentation of @param broke in 436fae5 #905
Comments
That isn't valid documentation; YARD is correct to warn you here. When documenting an attr_accessor, you should be documenting the getter portion, i.e., only the # @overload string
# @return [String] the string's value
# @overload string=(value)
# @param value [String] the value to set
attr_accessor :string This isn't well documented, unfortunately, so I understand the confusion. Documenting attrs should have their own callout in the guide. |
I have some documentation improvements coming in the guide for this. |
Add basic information on documenting attributes in the Getting Started Guide. References #905
Add basic information on documenting attributes in the Getting Started Guide. References #905
OK, thanks. As using @Overloads felt a bit verbose, I create the missing @param tag programmatically in my template for attribute writers instead. |
The changes introduced in 436fae5 messed up the following:
as attr_accessor’s reader won’t have a parameter. This should really be fixed, either by reverting 436fae5 (and erring on the side of not generating spurious warnings) or by adjusting the code in AttributeHandler to first add the parameters before the call to #register, then removing them (which will appease the check and still generate a correct result).
What do you think?
The text was updated successfully, but these errors were encountered: