# File lib/puppet/external/dot.rb, line 208
208:         def to_s (t = '')
209: 
210:             # This code is totally incomprehensible; it needs to be replaced!
211: 
212:             label = @options['shape'] != 'record' && @ports.length == 0 ?
213:                     @options['label'] ?
214:                         t + $tab + "label = \"#{@options['label']}\"\n" :
215:                         '' :
216:                     t + $tab + 'label = "' + " \\\n" +
217:                     t + $tab2 + "#{@options['label']}| \\\n" +
218:                     @ports.collect{ |i|
219:                         t + $tab2 + i.to_s
220:                     }.join( "| \\\n" ) + " \\\n" +
221:                     t + $tab + '"' + "\n"
222: 
223:                 t + "#{@name} [\n" +
224:                 @options.to_a.collect{ |i|
225:                     i[1] && i[0] != 'label' ?
226:                         t + $tab + "#{i[0]} = #{i[1]}" : nil
227:                 }.compact.join( ",\n" ) + ( label != '' ? ",\n" : "\n" ) +
228:                 label +
229:                 t + "]\n"
230:         end