replace Ruby #inject with #each_with_object

Edit
equivalent Web Development
Public
ruby
linter warning:  Use `each_with_object` instead of `inject`.

files_attributes = %i[foo bar]
# => [:foo, :bar] 

files_attributes.inject({}) { |h, attr| h[attr] = []; h }
# => {foo: [], bar: []} 

files_attributes.each_with_object({}) { |attr, hash| hash[attr] = [] }
# => {foo: [], bar: []}