I'm not sure if it's a configuration issue, or if this isn't supported.
I'm trying to reference the return value from another class method as the return from my current method, and it doesn't seem to recognize it as such.
For example:
module Foo
class FooClass
# @return [String]
def FooMethod
'test'
end
end
end
# @return (see Foo::FooClass#FooMethod)
def my_method
#init..
myclass.FooMethod
end
It's not currently supported, but it's a good candidate for an enhancement. The major question is what the syntax should be.
@return (see Class#method) isn't bad, but YARD also has a @see tag that can reference code objects. It might make sense to document it as @see Class#method instead.
If we can reach a consensus on the syntax, I'll add the feature to the roadmap.
The Reference tag bit is defined in YARD here.
I pulled the syntax that I tested along with it by following https://www.rubydoc.info/gems/yard/file/docs/GettingStarted.md#Customized_YARD_Markup.
Thanks for the consideration.
Ah, I missed that part. Thanks for pointing it out. We can start with @return (see Class#method) since it's more explicit.
Just wanted to thank you, I'm new to Ruby and Solargraph has really helped me understand a codebase I inherited. 馃憤
Thanks, I'm glad to hear it! Helping other developers is my favorite part of this project.
Support for reference tags is in the master branch. I expect to release it in gem version 0.29.0.
Released in v0.29.0.
Most helpful comment
Just wanted to thank you, I'm new to Ruby and Solargraph has really helped me understand a codebase I inherited. 馃憤