Method: JSI::JSON::Node#pretty_print
- Defined in:
- lib/jsi/json/node.rb
#pretty_print(q) ⇒ Object
pretty-prints a representation this node to the given printer
241 242 243 244 245 246 247 248 249 250 251 252 253 |
# File 'lib/jsi/json/node.rb', line 241 def pretty_print(q) q.instance_exec(self) do |obj| text "\#<#{obj.class.inspect} #{obj.object_group_text}" group_sub { nest(2) { breakable ' ' pp obj.content } } breakable '' text '>' end end |