Class: Formatters::Json
- Inherits:
-
Object
- Object
- Formatters::Json
- Defined in:
- lib/bkmrq/formatters/json.rb
Overview
Json Formatter
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.format(tree) ⇒ Object
8 9 10 |
# File 'lib/bkmrq/formatters/json.rb', line 8 def self.format(tree) new.format!(tree) end |
Instance Method Details
#format!(tree) ⇒ Object
12 13 14 |
# File 'lib/bkmrq/formatters/json.rb', line 12 def format!(tree) Oj.dump(format([], tree)) end |