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.2.4 features/support/file.rb
saucy-0.2.3 features/support/file.rb
saucy-0.2.2 features/support/file.rb
saucy-0.2.1 features/support/file.rb
saucy-0.2.0 features/support/file.rb
saucy-0.1.18 features/support/file.rb
saucy-0.1.17 features/support/file.rb
saucy-0.1.16 features/support/file.rb
saucy-0.1.15 features/support/file.rb
saucy-0.1.14 features/support/file.rb
saucy-0.1.13 features/support/file.rb
saucy-0.1.12 features/support/file.rb
saucy-0.1.11 features/support/file.rb
saucy-0.1.9 features/support/file.rb
saucy-0.1.8 features/support/file.rb
saucy-0.1.7 features/support/file.rb
saucy-0.1.6 features/support/file.rb
saucy-0.1.5 features/support/file.rb
saucy-0.1.4 features/support/file.rb
saucy-0.1.3 features/support/file.rb