Sha256: 97ea746742b8bd1abef6e1d137fd5af5634d7c64eb5eb547d58f37eab92848f1

Contents?: true

Size: 247 Bytes

Versions: 142

Compression:

Stored size: 247 Bytes

Contents

module FileHelpers
  def replace_in_file(path, find, replace)
    in_current_dir do
      contents = IO.read(path)
      contents.sub!(find, replace)
      File.open(path, "w") { |file| file.write(contents) }
    end
  end
end

World(FileHelpers)

Version data entries

142 entries across 142 versions & 3 rubygems

Version Path
saucy-0.1.2 features/support/file.rb
saucy-0.1.1 features/support/file.rb