One of my Tribune colleagues reminds me often in code reviews that each with object is often better for generating a Hash (vs. Array).  Delete this line (30) and use:
   mod_dirs.each_with_object({}) do |mod, hash|