public Method

Node.find_all(conditions)

Search for all nodes that match the given conditions, and return them as an array.

Source Code

# File action_controller/vendor/html-scanner/html/node.rb, line 104
def find_all(conditions)
  conditions = validate_conditions(conditions)

  matches = []
  matches << self if match(conditions)
  @children.each do |child|
    matches.concat child.find_all(conditions)
  end
  matches
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.