]> git.openstreetmap.org Git - chef.git/blob - cookbooks/chef/libraries/edit_file.rb
ea200c845cc74567c55606ed4fdf264e1b04e24d
[chef.git] / cookbooks / chef / libraries / edit_file.rb
1 class Chef
2   class Recipe
3     def edit_file(file, &block)
4       Chef::DelayedEvaluator.new do
5         ::File.new(file).collect do |line|
6           line = block.call(line)
7         end.join("")
8       end
9     end
10   end
11 end