# File lib/celerity/util.rb, line 96 def create_string(element) ret = [] unless (tag = element.getTagName).empty? ret << "tag:".ljust(TO_S_SIZE) + tag end element.getAttributes.each do |_, attribute| ret << " #{attribute.getName}:".ljust(TO_S_SIZE + 2) + attribute.getValue.to_s end unless (text = element.asText).empty? ret << " text:".ljust(TO_S_SIZE + 2) + element.asText end ret.join("\n") end