2

Is there a way to document each of the following attributes without breaking them into separate declarations?

attr_accessor :a, :b, :c

As opposed to:

# description for a
attr_accessor :a
# description for b
attr_accessor :b
# description for c
attr_accessor :c

2 Answers 2

1

What about this:

attr_accessor :a, :b, :c # description for a, b and c respectively
0

No, you have to do a call to atrr_accessor for each documented attribute.

If you rather have them ignored you can always add # :nodoc: at the end of the line.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.