sfcgeorge / yard-contracts

YARD Plugin for Automatic Param Docs from Contracts.
MIT License
26 stars 3 forks source link

Include contract specification in "View Source" #13

Open gsinclair opened 9 years ago

gsinclair commented 9 years ago

When you click "View source", you get to see the source code of the method.

In the real source code, the contract is specified above the method, and this is useful information.

If the contract were included in YARD's rendition of the source code of the method, that would be nice. Of course, this is duplication of information because the information from the contract is shown in the documentation itself. But if it is a complex contract, it can be nice to see the real thing.

sfcgeorge commented 9 years ago

Currently the method source is added automatically by YARD. I could add the Contract too. I initially decided not to but I'll reconsider now I know there's demand for it.