Module: Kernel

Defined in:
lib/pp.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.pp(*objs) ⇒ Object

prints arguments in pretty form.

#pp returns argument(s).



692
693
694
695
696
697
# File 'lib/pp.rb', line 692

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

Instance Method Details

#pretty_inspectObject

Returns a pretty printed object as a string.

See the PP module for more information.



685
686
687
# File 'lib/pp.rb', line 685

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