Class: Array

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

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#pretty_print(q) ⇒ Object

:nodoc:



346
347
348
349
350
351
352
# File 'lib/pp.rb', line 346

def pretty_print(q) # :nodoc:
  q.group(1, '[', ']') {
    q.seplist(self) {|v|
      q.pp v
    }
  }
end

#pretty_print_cycle(q) ⇒ Object

:nodoc:



354
355
356
# File 'lib/pp.rb', line 354

def pretty_print_cycle(q) # :nodoc:
  q.text(empty? ? '[]' : '[...]')
end