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.08k stars 454 forks source link

Storing output in a variable #89

Closed nickhoffman closed 12 years ago

nickhoffman commented 12 years ago

Is there a way to store awesome_print's output in a variable, rather than printing it to STDOUT?

michaeldv commented 12 years ago

arr = [1,2,3].ai # short for awesome_inspect

nickhoffman commented 12 years ago

That's fantastic. Thanks, @michaeldv. It'd be great to have this explicitly mentioned in the README and/or docs.