emmanuel/virtus — comment on commit de7e747014b13280ce165405d5e0bbbbf53784b4
File: lib/virtus/instance_methods.rb line 168
By dkubb:

IMHO for `#set_attributes` I wouldn't bother to have any "safety" like this. I would just take all the keys and then use mutator methods to set the values like this:

```ruby
def set(attribute_values)
attribute_values.each { |pair| attribute_set(*pair) }
end
```

The reason is that this is a private method. It should not be accepting user input. If someone uses this in an initializer or somewhere else in the code, and specifies a key that does not exist, I would want an exception to be thrown, not for it to "silently" ignore the error.