public Method

Elements.at(expr, &blk)

Searches this list for the first element (or child of these elements) matching the CSS or XPath expression expr. Root is assumed to be the element scanned.

See Hpricot::Container::Trav.at for more.

Source Code

# File hpricot/elements.rb, line 67
def at(expr, &blk)
  search(expr, &blk).first
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.