123456789_123456789_123456789_123456789_123456789_

Module: Kernel

Relationships & Source Files
Defined in: lib/pp.rb

Class Method Summary

  • pp(*objs) mod_func

    prints arguments in pretty form.

Instance Method Summary

Class Method Details

pp(*objs) (mod_func)

prints arguments in pretty form.

pp returns argument(s).

[ GitHub ]

  
# File 'lib/pp.rb', line 644

def pp(*objs)
  objs.each {|obj|
    PP.pp(obj)
  }
  objs.size <= 1 ? objs.first : objs
end

Instance Method Details

pretty_inspect

Returns a pretty printed object as a string.

See the ::PP module for more information.

[ GitHub ]

  
# File 'lib/pp.rb', line 637

def pretty_inspect
  PP.pp(self, ''.dup)
end