class LittleGhost::Tools::Filesystem::ReplaceInFile
Replaces one unique text occurrence through a writable sandbox.
Public Instance Methods
Source
# File lib/little_ghost/tools/filesystem.rb, line 71 def call(input) sandbox.replace(input.fetch("path"), input.fetch("old_text"), input.fetch("new_text"), context:) end
Replaces the one matching old_text occurrence at path.