Class: Approvals::Writers::JsonWriter
- Inherits:
-
TextWriter
- Object
- TextWriter
- Approvals::Writers::JsonWriter
- Defined in:
- lib/approvals/writers/json_writer.rb
Instance Method Summary collapse
Methods inherited from TextWriter
Instance Method Details
#extension ⇒ Object
5 6 7 |
# File 'lib/approvals/writers/json_writer.rb', line 5 def extension 'json' end |
#format(data) ⇒ Object
9 10 11 |
# File 'lib/approvals/writers/json_writer.rb', line 9 def format(data) JSON.pretty_generate(JSON.parse(data)) end |