JCLL
JCLL

Reputation: 5555

Crystal equivalent shard for "pp" (pretty printing)

What is the Crystal equivalent shard for "pp" used in Ruby for pretty printing complex data structures ?

Upvotes: 3

Views: 496

Answers (1)

Vitalii Elenhaupt
Vitalii Elenhaupt

Reputation: 7326

PrettyPrint is a part of a Crystal stdlib.

In short, you can just do p obj for "inspect" style output, pp obj for "pretty inspect" style output.

Upvotes: 6

Related Questions