etsy/foodcritic-rules — pull request #11 by ruizink (2014-09-20 12:10:40+00:00)
Title: Fix issue #4 by creating a new Nokogiri::XML object before 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.