Class: SourceLocationTool

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

Overview

Tool: Fetch source file and line number for a YARD object

Instance Method Summary collapse

Methods inherited from YardTool

returns

Instance Method Details

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



774
775
776
777
778
779
# File 'lib/yardmcp.rb', line 774

def call(path:, gem_name: nil)
  with_yard_errors do
    location = YardUtils.instance.source_location(path, gem_name)
    ok({ path:, gem_name:, resource_uris: resource_uris(gem_name, path), source_location: location })
  end
end