etsy/foodcritic-rules — pull request #10 by ruizink (2014-09-20 12:00:13+00:00)
Title: Fix issue #3 by creating a new Nokogiri::XML before doing xpath query.

I noticed that if you xpath query objects returned from find_resources(ast).find_all, you end up querying the whole ast. That's the reason for this issue.

Sometimes a line of code is worth than 1000 words, so...

for instance, this:

```ruby
find_resources(ast, :type => 'execute').find_all do |cmd|
result = cmd.xpath('//')
end
```

has the same result as this:

``` ruby
find_resources(ast, :type => 'execute').find_all do |cmd|
result = ast.xpath('//')
end
```

That's why i decided to build a new Nokogiri::XML object with the cmd XML.