yard icon indicating copy to clipboard operation
yard copied to clipboard

[Feature request] partial `see`

Open sevenc-nanashi opened this issue 3 years ago • 1 comments

It will be nice if see can be partial like this:

class K
  #
  # Do something
  #
  # @param a testing 1
  # @param b testing 2
  # @param c testing 3
  #
  def method(a, b, c)
    puts a, b, c
  end
end

class A
  #
  # Do something
  #
  # @param (see K#method - a)
  #
  def method(...)
    @k.method(self, ...)
  end
end

sevenc-nanashi avatar Sep 01 '21 04:09 sevenc-nanashi

This could be accepted as a pull request if you wanted to take it on, otherwise it's probably unlikely to be added given that you can work around this limitation with @macro calls pretty easily:

# @macro a_param
#   @param a testing 1
class K
  #
  # Do something
  #
  # @macro a_param
  # @param b testing 2
  # @param c testing 3
  def method(a, b, c)
    puts a, b, c
  end
end

class A
  #
  # Do something
  #
  # @macro a_param
  def method(a)
    @k.method(self, a)
  end
end

lsegal avatar Sep 05 '21 03:09 lsegal