Class: Renamespace::ExpandRelativeRequiresWithinAllFiles

Inherits:
Object
  • Object
show all
Defined in:
lib/renamespace/expand_relative_requires_within_all_files.rb

Instance Method Summary collapse

Instance Method Details

#call ⇒ Object



7
8
9
10
11
12
13
# File 'lib/renamespace/expand_relative_requires_within_all_files.rb', line 7

def call
  all_suitable_ruby_file_paths.each do |path|
    content_orig = File.read(path)
    content_new = expand_in_file(content_orig, path)
    File.write(path, content_new) unless content_orig == content_new
  end
end