module Rails::Generators::Actions
def append_file_with_newline(path, str, options = {})
def append_file_with_newline(path, str, options = {}) gsub_file path, /\n?\z/, options do |match| match.end_with?("\n") ? "" : "\n#{str}\n" end end
def append_file_with_newline(path, str, options = {}) gsub_file path, /\n?\z/, options do |match| match.end_with?("\n") ? "" : "\n#{str}\n" end end