Class: AncestorsTool

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

Overview

Tool: Fetch the full ancestor chain (superclasses and included modules) for a class/module in YARD

Instance Method Summary collapse

Methods inherited from YardTool

returns

Instance Method Details

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



811
812
813
814
815
816
# File 'lib/yardmcp.rb', line 811

def call(path:, gem_name: nil)
  with_yard_errors do
    ancestors = YardUtils.instance.ancestors(path, gem_name)
    ok({ path:, gem_name:, resource_uris: resource_uris(gem_name, path), ancestors: }, text: ancestors.join("\n"))
  end
end