I'd favour coercing the argument it to an Array like so:
```ruby
Array(attributes).each do |name, value|
  # ...
end
```