Class: GetDocTool

Inherits:
YardTool
  • Object
show all
Defined in:
lib/yardmcp.rb

Overview

Tool: Fetch documentation for a YARD object

Instance Method Summary collapse

Methods inherited from YardTool

returns

Instance Method Details

#call(path:, gem_name: nil) ⇒ Object



682
683
684
685
686
687
# File 'lib/yardmcp.rb', line 682

def call(path:, gem_name: nil)
  with_yard_errors do
    doc = YardUtils.instance.get_doc(path, gem_name)
    ok({ path:, gem_name:, resource_uris: resource_uris(gem_name, path), document: doc }, text: JSON.pretty_generate(doc))
  end
end