Returns a textual representation of the node
Source Code
# File action_controller/vendor/html-scanner/html/node.rb, line 311 def to_s if @closing == :close "</#{@name}>" else s = "<#{@name}" @attributes.each do |k,v| s << " #{k}" s << "=\"#{v}\"" if String === v end s << " /" if @closing == :self s << ">" @children.each { |child| s << child.to_s } s << "</#{@name}>" if @closing != :self && !@children.empty? s end end
<code/>and<pre/>for code samples.