I’ve had this question for a long time, but I’ve not asked it before. When looking at a problem, I sometimes get a massive lump of text, which is a dump of a Ruby/Rails object. It has no new lines and includes nested objects, arrays and much more. Here is a tiny example (separated into lines at each comma):
Agree with Eric. Try pretty print or “pp” in the console. You can also look into using awesome printwhich tends to provide additional formatting and structure to inspect these.
For especially long or nested object operations it can be helpful to use the pluck method to inspect a single attribute or filter method to select a segment of them. Combining these can give you quicker insight into the objects you’re dealing with.
One thing I have relied on in the past is this online formatter: https://codebeautify.org/ruby-formatter-beautifier which not only can do a Ruby object notation (what I think you’re looking at in your case) but also JSON and XML. When I have a one-off lump of text that I need to unspool and make more visually understandable, I will often use that or one of its variants.