Class: Dictionary

Inherits:
Object show all
Defined in:
lib/perception/ppp.rb,
lib/perception/ppp.rb

Pretty Print Patches collapse

Instance Method Details

#inspectString

Returns:



384
385
386
387
388
# File 'lib/perception/ppp.rb', line 384

def inspect
  ary = []
  each {|k,v| ary << k.inspect + "=>" + v.inspect}
  '{' + ary.join(", ") + '}'
end

#pretty_print(q) ⇒ String

Returns:



395
396
397
# File 'lib/perception/ppp.rb', line 395

def pretty_print(q)
  q.pp_hash self
end

#pretty_print_cycle(q) ⇒ Object



399
400
401
# File 'lib/perception/ppp.rb', line 399

def pretty_print_cycle(q)
  q.text(empty? ? '{}' : '{...}')
end