Class: CallMap::Analyzer
- Inherits:
-
Object
- Object
- CallMap::Analyzer
- Defined in:
- lib/call_map/analyzer.rb
Overview
Builds a call tree from a starting method definition by recursively extracting calls and resolving them against the SourceIndex.
Instance Method Summary collapse
-
#build_call_tree(definition, depth: 3) ⇒ CallNode
Build a call tree rooted at the given definition.
-
#initialize(index) ⇒ Analyzer
constructor
A new instance of Analyzer.
Constructor Details
Instance Method Details
#build_call_tree(definition, depth: 3) ⇒ CallNode
Build a call tree rooted at the given definition.
25 26 27 28 |
# File 'lib/call_map/analyzer.rb', line 25 def build_call_tree(definition, depth: 3) visited = Set.new build_node(definition, nil, depth, visited, entry: true) end |