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
Gilad Naaman
  • 6,390
  • 15
  • 52
  • 82

2 Answers2

1

What about this:

attr_accessor :a, :b, :c # description for a, b and c respectively
Gagan Gami
  • 10,121
  • 1
  • 29
  • 55
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.

Carlos Roque
  • 448
  • 5
  • 11