module ViteRuby::CLI::FileUtils
def replace_first_line(path, target, replacement)
- Api: - private
Other tags:
- Since: - 1.2.11
def replace_first_line(path, target, replacement) content = read_lines(path) content[index(content, path, target)] = "#{ replacement }\n" write(path, content) end