From: Jeremy McAnally Date: 2008-02-16T13:17:46+09:00 Subject: Re: Proper way to RDoc markup? not quite I'd rather have really readable code and good generated documentation than 5 LOC. Of course, doing this often would throw off your app LOC to testing LOC, now wouldn't it? ;) --Jeremy On Feb 15, 2008 5:42 PM, 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 > > -- http://jeremymcanally.com/ http://entp.com Read my books: Ruby in Practice (http://manning.com/mcanally/) My free Ruby e-book (http://humblelittlerubybook.com/) Or, my blogs: http://mrneighborly.com http://rubyinpractice.com