class YARD::CodeObjects::MacroObject

def apply(docstring, call_params = [], full_source = '', block_source = '', _method_object = nil) # rubocop:disable Lint/UnusedMethodArgument

Other tags:
    See: find_or_create -

Parameters:
  • docstring (Docstring) -- the docstring to create a macro out of
def apply(docstring, call_params = [], full_source = '', block_source = '', _method_object = nil) # rubocop:disable Lint/UnusedMethodArgument
  docstring = docstring.all if Docstring === docstring
  parser = Docstring.parser
  handler = OpenStruct.new
  handler.call_params = call_params[1..-1]
  handler.caller_method = call_params.first
  handler.statement = OpenStruct.new(:source => full_source)
  parser.parse(docstring, nil, handler).to_docstring.to_raw
end