I have a couple more questions. Hopefully they’re not so dumb this time.
I need a hash that maintains insertion order. In Java, I’d use
LinkedHashMap. Does Ruby have one?
I like documentation. So far, Rdoc is great, but I wonder about the
But I need to validate, for example, so …
@someattr unless i < 10
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
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.
Thanks in advance,