Class: String

Inherits:
Object show all
Defined in:
lib/pp.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#pretty_print(q) ⇒ Object

:nodoc:



498
499
500
501
502
503
504
505
506
507
508
509
# File 'lib/pp.rb', line 498

def pretty_print(q) # :nodoc:
  lines = self.lines
  if lines.size > 1
    q.group(0, '', '') do
      q.seplist(lines, lambda { q.text ' +'; q.breakable }) do |v|
        q.pp v
      end
    end
  else
    q.text inspect
  end
end