What’s mining: understanding YARD
A few weeks have passed since RubyMine 3.1 release and RubyMine 3.1.1 bugfix update is almost ready.
However today I want to show you some new cool feature — coming YARD support (http://yardoc.org). We’ve received a good number of votes for this YARD and external docs support in our tracker: RUBY-5590 and RUBY-3309. And voila, your votes did the trick!
Now let me show you what we are working on!
First, RubyMine understands YARD tag annotations syntax in ruby comments as well as in plain rdoc files.
Then, RubyMine is smart enough to extract type annotations from the YARD annotated comments. On the screenshot below you can see that the inferred type of the
black_box method is String, this means that you’ll get accurate code completion and validation.
But that’s not all, you also get code completion according to the @param types in method bodies.
There is still a lot to be discussed and done, however feel free to tell us what features you would like to see in the next version of RubyMine as far as documentation functionality is concerned.
Develop with pleasure!
-JetBrains RubyMine Team