Class: BlastRadius::Formatters::TextFormatter
- Defined in:
- lib/blast_radius/formatters/text_formatter.rb
Constant Summary collapse
- TREE_BRANCH =
'├── '- TREE_LAST =
'└── '- TREE_VERTICAL =
'│ '- TREE_SPACE =
' '
Instance Method Summary collapse
-
#format(root_node) ⇒ String
Format dependency tree as ASCII tree.
Methods inherited from Base
Constructor Details
This class inherits a constructor from BlastRadius::Formatters::Base
Instance Method Details
#format(root_node) ⇒ String
Format dependency tree as ASCII tree
14 15 16 17 18 |
# File 'lib/blast_radius/formatters/text_formatter.rb', line 14 def format(root_node) lines = [root_node.model_name] format_children(root_node.children, '', lines) lines.join("\n") end |