Class: KongSchema::Reporter::JSONPrettyPrinter
- Inherits:
-
Object
- Object
- KongSchema::Reporter::JSONPrettyPrinter
- Defined in:
- lib/kong_schema/reporter.rb
Overview
Print objects as human-readable JSON
Class Method Summary collapse
Class Method Details
.print(object) ⇒ Object
42 43 44 |
# File 'lib/kong_schema/reporter.rb', line 42 def self.print(object) JSON.pretty_generate(YAML.load(YAML.dump(object))) + "\n" end |