While we are here, you could probably expand this to be a regular expression matcher as well:

```ruby
@attributes.all? do |attribute, expected|
  if expected.is_a?(Regexp)
    resource.send(attribute) =~ expected
  else
    resource.send(attribute) == expected
  end
end
```