MCPcopy Create free account
hub / github.com/ScriptedAlchemy/tracedecay / extract_docstring

Method extract_docstring

src/extraction/ruby_extractor.rs:591–593  ·  view source on GitHub ↗

Extract docstrings from `# comment` lines preceding definitions. Ruby uses comment lines (# ...) as documentation. We look for `comment` sibling nodes that immediately precede the given definition node.

(state: &ExtractionState, node: TsNode<'_>)

Source from the content-addressed store, hash-verified

589 /// Ruby uses comment lines (# ...) as documentation. We look for `comment`
590 /// sibling nodes that immediately precede the given definition node.
591 fn extract_docstring(state: &ExtractionState, node: TsNode<'_>) -> Option<String> {
592 docstring_from_hash_comments(&state.source, node)
593 }
594
595 /// Find the method name identifier in a singleton method.
596 ///

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected