1 comment
Comment actions Permalink

Hi Andreas,

thread http://www.jetbrains.net/devnet/message/5246073#5246073 says that RubyMine supports some kind of type annotation. Is there any documentation what kind of annotations are supported. I didn't find anything mentioned in the online-help.

Indeed Rubymine supports Netbeans style type annotations for methods and variables. Unfortunally it is not well documented yet.

You can add type annotation to local variable:

# :type: => String

aaa = untyped_call()
In this case RubyMine will match local variable aaa with type String.

Also you can annotate methods like:

# :return: => Module::Class

def foo()

     ...

end

We have some plans on impoving this, e.g. adding type annotations by intention action, highlighting and code completion/resolve for types in type annotations etc.
These kinds of annotations are already supported by RubyMine, feedback as usual is welcome!

Also we have internal ruby API which allows you to extend RubyMIne type system. Here is some documentation on it:
http://www.jetbrains.net/devnet/thread/282641?tstart=30

Best regards,
Oleg

0

Please sign in to leave a comment.