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:



410
411
412
413
414
415
416
417
418
419
420
421
# File 'lib/pp.rb', line 410

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