yard-contracts icon indicating copy to clipboard operation
yard-contracts copied to clipboard

Add method overloading support

Open sfcgeorge opened this issue 9 years ago • 1 comments

The last overloading of a method overrides all prior ones in the docs. YARD has the @overload tag for documenting this kind of thing, and as a big feature of Contracts is dynamic dispatch, yard-contracts should support documenting it.

When a second contract is documented it should check for existing documentation of the method, add overload tag and merge. Could be tricky figuring out if the addition of overload and indent has already been done, e.g. if this isn't the first overloading of that method. Probably match(/@overload/) will do.

sfcgeorge avatar Mar 28 '15 22:03 sfcgeorge

+1 for this!

egonSchiele avatar Mar 29 '15 05:03 egonSchiele