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

YARD Plugin for Automatic Param Docs from Contracts.

Results 8 yard-contracts issues
Sort by recently updated
recently updated
newest added

# Context I am trying to generate yard documentation with contract information. When I use the command line it reports that my doc coverage is 100%. When I use the...

Doing the following doesn't work as expected. ``` ruby class Foo include Contracts class Num def foo(a) 1 end end end ``` Shows the method as an instance method.

RubyDoc.info doesn't automatically install plugins for [security reasons](https://rubydoc.tenderapp.com/discussions/problems/172-custom-yard-handler-is-not-applied) so I need to get the code fixed up a bit and then hopefully they will install it manually.

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...

``` ruby class Viking include Contracts Contract None => User attr_reader :user Contract None => Hat attr_reader :hat end ``` fails with: ``` [error]: NoMethodError: undefined method `type' for nil:NilClass...

I have the following method: ``` ruby class Operation Contract ({ "operation_type" => String, "operation_id" => String, "file_path" => String }) => Any def initialize(record) end end ``` When run...

The last overloading of a method overrides all prior ones in the docs. YARD has the [@overload](http://www.rubydoc.info/gems/yard/file/docs/Tags.md#overload) tag for documenting this kind of thing, and as a big feature of...

YARD seems to have an [@option](http://www.rubydoc.info/gems/yard/file/docs/Tags.md#option) tag for documenting options Hashes, should that be used? Currently the full options hash is used in @param which can be a bit messy....