YARD @type for instance variables

Answered

I've searched all over the internet and can't find anything that tells me how to use the @type documentation for an instance variable.

https://www.jetbrains.com/help/ruby/using-annotations.html#local_var works just fine for local variables

 

I've tried both of the following and neither work

# @type @profile [Profile]

@profile = company.profiles.first

and

# @type [Profile]

@profile = company.profiles.first # Company has_many Profiles

 

Any help would be appreciated. Thanks!

1 comment
Comment actions Permalink

Hello,

unfortunately at the moment it's supported for local variables, not instance ones. Please vote and follow the corresponding request: 

https://youtrack.jetbrains.com/issue/RUBY-22276

1

Please sign in to leave a comment.