lib/edi4r.rb
# This implementation of +inspect()+ is very verbose in that it
# inspects also all contained objects in a recursive manner.
#
# indent::  String offset to use for indentation / pretty-printing
# symlist:: Array of getter names (passed as symbols) whose values are
#           to be listed. Note that :name is included automatically.
This implementation of +inspect()+ is very verbose in that it
inspects also all contained objects in a recursive manner.

:  String offset to use for indentation / pretty-printing
symlist:: Array of getter names (passed as symbols) whose values are
to be listed. Note that :name is included automatically.
This implementation of + inspect () + is very verbose in that it inspects also all contained objects in a recursive manner . : String offset to use for indentation / pretty - printing symlist :: Array of getter names ( passed as symbols ) whose values are to be listed . Note that : name is included automatically .
def inspect( indent='', symlist=[] )
      headline = indent + self.name+': ' + symlist.map do |sym|
        "#{sym} = #{(s=send(sym)).nil? ? 'nil' : s.to_s}"
      end.join(', ') + "\n"
      headline << @header.inspect(indent+'  ') if @header
      s = @a.inject( headline ){|s,obj| s << obj.inspect(indent+'  ')}
      @trailer ? s << @trailer.inspect(indent+'  ') : s
    end
def inspect ( indent = '' , symlist = [ ] ) headline = indent + self . name + ': ' + symlist . map do | sym | "#{sym} = #{(s=send(sym)).nil? ? 'nil' : s.to_s}" end . join ( ', ' ) + "\n" headline << @header . inspect ( indent + '  ' ) if @header s = @a . inject ( headline ) { | s , obj | s << obj . inspect ( indent + '  ' ) } @trailer ? s << @trailer . inspect ( indent + '  ' ) : s end
This implementation of +inspect()+ is very verbose in that it
inspects also all contained objects in a recursive manner.
This implementation of + inspect () + is very verbose in that it inspects also all contained objects in a recursive manner .
indent
symlist