import type { SyntaxNode } from 'tree-sitter'; import type { Definition } from '../../definition-extractor.js'; import type { FileReference, InternalSymbolUsage } from '../../reference-extractor.js'; /** * Extract all Ruby references from an AST. * Handles: * - require 'something' → external gem or internal file * - require_relative '../path' → relative file * - include/extend/prepend ModuleName → mixin references * - Basic Rails autoloading: User → app/models/user.rb */ export declare function extractRubyReferences(rootNode: SyntaxNode, filePath: string, knownFiles: Set): FileReference[]; /** * Resolve a require_relative path to an absolute file path (exported for use in RubyAdapter). */ export declare function resolveRubyImportPath(source: string, fromFile: string, knownFiles: Set): string | null; /** * Extract internal symbol usages from a Ruby AST. * * Detects: * 1. Method calls without explicit receiver (implicit self): `validate_email(email)` * 2. Method calls with explicit `self` receiver: `self.validate_email(email)` * 3. `super` calls — mapped to the enclosing method's name as a reference to parent class method * * @param rootNode - The root of the parsed Ruby AST * @param definitions - All definitions extracted from the same file * @returns Array of InternalSymbolUsage entries */ export declare function extractRubyInternalUsages(rootNode: SyntaxNode, definitions: Definition[]): InternalSymbolUsage[]; //# sourceMappingURL=reference-extractor.d.ts.map