lib/pragmater/writer.rb in pragmater-3.0.0 vs lib/pragmater/writer.rb in pragmater-3.1.0
- old
+ new
@@ -4,10 +4,10 @@
# Writes formatted pragma comments to source file.
class Writer
# rubocop:disable Metrics/ParameterLists
def initialize file_path, new_comments, formatter: Formatter, commenter: Commenter
@file_path = file_path
- @file_lines = File.open(file_path).to_a
+ @file_lines = File.open(file_path, &:to_a)
@formatter = formatter
@commenter = commenter
@old_comments = file_comments
@new_comments = new_comments
end