Class: CallMap::Formatters::TextTree
- Inherits:
-
Object
- Object
- CallMap::Formatters::TextTree
- Defined in:
- lib/call_map/formatters/text_tree.rb
Overview
Renders a CallNode tree as a text tree using box-drawing characters, suitable for pasting into Notion or pull requests.
OrdersController#destroy
├─ before_action set_order
│ └─ Order.find
└─ OrderDeleteService.execute
└─ OrderDeleteService#execute
With include_comments: true, a resolved node's leading comment is appended as an inline annotation (opt-in — comments are reading aid, not call-graph structure):
└─ OrderDeleteService#execute # Destroys the order.
Constant Summary collapse
- MAX_COMMENT_LENGTH =
Only the first comment line is shown, truncated to keep the tree scannable.
60
Class Method Summary collapse
Instance Method Summary collapse
- #format(root) ⇒ Object
-
#initialize(include_comments: false) ⇒ TextTree
constructor
A new instance of TextTree.
Constructor Details
#initialize(include_comments: false) ⇒ TextTree
Returns a new instance of TextTree.
30 31 32 |
# File 'lib/call_map/formatters/text_tree.rb', line 30 def initialize(include_comments: false) @include_comments = include_comments end |