]> git.openstreetmap.org Git - chef.git/blob - cookbooks/chef/libraries/edit_file.rb
Update to chef server 12
[chef.git] / cookbooks / chef / libraries / edit_file.rb
1 class Chef
2   module Mixin
3     module EditFile
4       def edit_file(file, &block)
5         Chef::DelayedEvaluator.new do
6           ::File.new(file).collect do |line|
7             block.call(line)
8           end.join("")
9         end
10       end
11     end
12   end
13
14   class Recipe
15     include Chef::Mixin::EditFile
16   end
17 end