public Method

Tag.[](attr)

A convenience for obtaining an attribute of the node. Returns nil if the node has no attributes.

Source Code

# File action_controller/vendor/html-scanner/html/node.rb, line 298
def [](attr)
  @attributes ? @attributes[attr] : nil
end
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.