From: Jim Deville Date: 2009-02-03T09:37:07+09:00 Subject: [ruby-core:21775] Re: New documentation system! > -----Original Message----- > From: Charles.O.Nutter@sun.com [mailto:Charles.O.Nutter@sun.com] On > Behalf Of Charles Oliver Nutter > Sent: Monday, February 02, 2009 4:33 PM > To: ruby-core@ruby-lang.org > Subject: [ruby-core:21774] Re: New documentation system! > > Tom Link wrote: > > I personally would like to see some sort of annotations that could be > > used for this. > > > > class A > > > > S = "FOO" > > > > @pre x.respond_to?(:*) > > @post result.is_a?(String) > > def fooer(x) > > S * x > > end > > Yes, this is exactly the sort of thing I'm thinking of. Simple > type/duck > expectations that can be ignored, used for enforcement, or even used > for > optimization. Doing it as doc annotations makes it pretty low-impact. > > - Charlie > I think we would need to find an unused character for the sigil. @ is probably a bad one ;) JD