Method: YARD::Docstring#+

Defined in:
lib/yard/docstring.rb

#+(other) ⇒ Docstring

Adds another YARD::Docstring, copying over tags.

Parameters:

Returns:

  • (Docstring)

    a new docstring with both docstrings combines

[View source]

60
61
62
63
64
65
66
67
# File 'lib/yard/docstring.rb', line 60

def +(other)
  case other
  when Docstring
    Docstring.new([all, other.all].join("\n"), object)
  else
    super
  end
end