Open keithrbennett opened 10 years ago
:+1:
:+1: -- I've been banging my head against a wall trying to figure out how to get this to work.
Here's a method that would kind of work around it, except that it puts quotes around every line, and you'd have to monkey patch Kernel.ap:
def apx(obj)
obj.is_a?(String) ? puts(obj.split("\n").map(&:ai).join("\n")) : ap obj
end
# apx("a\b") =>
"a"
"b"
I'd like to be able to print a multiline string, but even when changing the multiline setting, awesome_print prints a literal "\n" rather than issuing a new line. Here's a pry session illustrating what I mean:
Is there a way to get it to do the new line instead of '\n'?