Class: BlastRadius::Formatters::JsonFormatter
- Defined in:
- lib/blast_radius/formatters/json_formatter.rb
Instance Method Summary collapse
-
#format(root_node) ⇒ String
Format dependency tree as JSON.
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 JSON
11 12 13 |
# File 'lib/blast_radius/formatters/json_formatter.rb', line 11 def format(root_node) JSON.pretty_generate(node_to_hash(root_node)) end |