fgrehm/virtus — comment on commit 64c3ab0b1edf9660786fa86e51e7800016f30317
File: lib/virtus/instance_methods.rb line 157
By dkubb:

What about this?

```ruby
def set_attributes(attribute_values)
return unless attribute_values.respond_to?(:to_hash)
attribute_values.to_hash.each do |name, value|
# ...
end
end
```