MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / scopeAt

Function scopeAt

src/resolution/ruby-parameter-flow.ts:467–473  ·  view source on GitHub ↗
(file: string, line: number)

Source from the content-addressed store, hash-verified

465
466 /** The innermost class or module around a line. */
467 const scopeAt = (file: string, line: number): FlowMethod | null => {
468 let innermost: FlowMethod | null = null;
469 for (const node of methods.scopesIn(file)) {
470 if (node.startLine <= line && node.endLine >= line && (!innermost || node.endLine - node.startLine < innermost.endLine - innermost.startLine)) innermost = node;
471 }
472 return innermost;
473 };
474
475 const signatureOf = (method: FlowMethod): RubySignature | null => {
476 let signature = signatures.get(method.id);

Callers 4

selfValueFunction · 0.85
constantValueFunction · 0.85
valueOfFunction · 0.85
isKnownFunction · 0.85

Calls 1

scopesInMethod · 0.65

Tested by

no test coverage detected