]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/chef/libraries/edit_file.rb
Completely disable faulty offloading on HP NC362i
[chef.git] / cookbooks / chef / libraries / edit_file.rb
index 1c8e263e41697f30c73352b092157e48880940f0..6260c8a40c182f937e592ca882d91c32035b1e5a 100644 (file)
@@ -1,9 +1,17 @@
 class Chef
 class Chef
-  class Recipe
-    def edit_file(file, &block)
-      ::File.new(file).collect do |line|
-        line = yield line
-      end.join("")
+  module Mixin
+    module EditFile
+      def edit_file(file, &block)
+        Chef::DelayedEvaluator.new do
+          ::File.new(file).collect do |line|
+            block.call(line)
+          end.join("")
+        end
+      end
     end
   end
     end
   end
+
+  class Recipe
+    include Chef::Mixin::EditFile
+  end
 end
 end