On Dec 9, 2005, at 4:57 AM, Ross Bamford wrote:

> 2) I like documentation. So far, Rdoc is great, but I wonder about  
> the following case:
>
> 	class SomeClass
> 	  attr_accessor :someattr
>
> 	  # But I need to validate, for example, so ...
> 	  def someattr=(i)
> 	    @someattr unless i < 10
> 	  end
> 	end
>
> In the above case, Ruby warns about the method being redefined (and  
> the original being discarded). However, if I change it to  
> attr_reader to avoid that (i.e. manually make the reader) then RDoc  
> lists the attribute as read-only, with the writer shown as a normal  
> method. This is perfectly reasonable, but I feel there's probably a  
> way around it.

You could just define both manually.

James Edward Gray II