You could do

```ruby
lib_files.each_with_object({}) do |file, modules|
   name          = Pathname.new(file).relative_path_from(@lib_root)
   content       = File.read(file)
   modules[name] = content
 end
```