awesome-print / awesome_print

Pretty print your Ruby objects with style -- in full color and with proper indentation
http://github.com/michaeldv/awesome_print
MIT License
4.07k stars 454 forks source link

config or params for truncate very long string. #372

Open ranska opened 4 years ago

ranska commented 4 years ago

In some big hash. For example api payload. There are sometimes text and many other keys and value. Mainly when we use ap the wall object is print but when there is big text. It takes sometime many screens and needs to scroll a lot just to see if a simple attribute is well set. It can be good if we can truncate those text by passing a truncate param to ap. like

ap my_object, truncate: 4
# or
ap my_object, string_trucate: 4

# and it will print on screen only the first 4th char of a string

thank for this awesome gem and all your work

ranska commented 4 years ago

Ps: how can I set label feature request?