Method: AbstractFeatureBranch::FileBeautifier.process_file
- Defined in:
- lib/abstract_feature_branch/file_beautifier.rb
.process_file(file_path) ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/abstract_feature_branch/file_beautifier.rb', line 26 def self.process_file(file_path) AbstractFeatureBranch.logger.info "Beautifying #{file_path}..." file_content = nil File.open(file_path, 'r') do |file| file_content = file.readlines.join end beautified_file_content = beautify(file_content) File.open(file_path, 'w+') do |file| file << beautified_file_content end end |