Class: REXML::Element

Inherits:
Object
  • Object
show all
Defined in:
lib/wwmd/class_extensions/extensions_external.rb

Instance Method Summary collapse

Instance Method Details

#pp(fn = nil) ⇒ Object

pretty print (indent=0) to stdout or filename [fn]



5
6
7
8
9
10
11
12
13
14
15
# File 'lib/wwmd/class_extensions/extensions_external.rb', line 5

def pp(fn=nil)
  tmp = ""
  self.write(tmp,0)
  if fn
    tmp.write(fn)
    return fn
  else
    return tmp
  end
  nil
end