A convenience for obtaining an attribute of the node. Returns nil if the node has no attributes.
# File action_controller/vendor/html-scanner/html/node.rb, line 298 def [](attr) @attributes ? @attributes[attr] : nil end
<code/>
<pre/>
<code/>and<pre/>for code samples.