Using YARD @!macro ? Follow
Does anyone know if its possible to configure RubyMine / Intellij + ruby to understand the macro expansions in YARD.
http://www.rubydoc.info/gems/yard/file/docs/Tags.md#macro
I've defined a class method, that adds methods to my class, and documented it as follows:
# Defines a new dependency
# @param [Symbol] dependency_name
# @param [Class] dependency_class
# @param [Object] options
# @!macro [attach] dependency
# @return [$2] the $1 dependency
def dependency(dependency_name, dependency_class, options = {})
Then in the class I have:
dependency :contact_dao, Contact
dependency :phone_number_create, PhoneNumbers::PhoneNumberCreateService
dependency :publish, Broadcasters::Publish
dependency :logger, Rails.logger
I would expect intellij to be aware of the instance methods I've attached, but it doesn't appear to.
Please sign in to leave a comment.
I've noticed that I can use the attribute declaration to make intellij pick it up like so:
But that adds a lot of line noise that i'd rather not have to include
Hello, thanks for feature request: https://youtrack.jetbrains.com/issue/RUBY-20130.