Class: Array

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

Instance Method Summary collapse

Instance Method Details

#pretty_print(q) ⇒ Object



301
302
303
304
305
306
307
# File 'lib/pp.rb', line 301

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

#pretty_print_cycle(q) ⇒ Object



309
310
311
# File 'lib/pp.rb', line 309

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