Jari Williamsson
2/16/2008 6:48:00 AM
Perhaps a reason for RDoc not supporting inline documentation for
attributes is that it can't safely judge how to interpret multiline
inline comments.
attr_accessor :my_accessor # This accessor will do something, but
# this row could belong to any of the accessors because of the new line
attr_accessor :my_next_accessor
Best regards,
Jari Williamsson
Gary Wright wrote:
>
> On Feb 15, 2008, at 5:28 PM, Jeremy McAnally wrote:
>
>> I guess...? You just need to pay attention to what you're doing. :P
>> I personally think this is more readable than inlining:
>>
>> # This does something fun
>> attr_reader :fun
>>
>> # This does something writable
>> attr_accessor :read_write
>>
>> # This does something AWESOME
>> attr_accessor :forty_two
>
> Yuck, that is 8 lines vs. 3 (below). I always found it
> strange that RDOC didn't parse comments to the right
> of an accessor declaration yet that is exactly how
> attributes are documented in the HTML pages generated
> by RDOC.
>
> attr_reader :fun # This does something fun
> attr_accessor :read_write # This does something writable
> attr_accessor :forty_two # This does something AWESOME
>
>
> Gary Wright
>
>