]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/chef/libraries/edit_file.rb
Compare kernel versions correctly
[chef.git] / cookbooks / chef / libraries / edit_file.rb
index 400e1967e0c96718f84733728d6c8d621f25963a..ea200c845cc74567c55606ed4fdf264e1b04e24d 100644 (file)
@@ -1,22 +1,11 @@
 class Chef
-  class Util
-    class EditedFile
-      def initialize(file, block)
-        @file = file
-        @block = block
-      end
-
-      def to_s
-        ::File.new(@file).collect do |line|
-          line = @block.call(line)
-        end.join("")
-      end
-    end
-  end
-
   class Recipe
     def edit_file(file, &block)
-      Chef::Util::EditedFile.new(file, block)
+      Chef::DelayedEvaluator.new do
+        ::File.new(file).collect do |line|
+          line = block.call(line)
+        end.join("")
+      end
     end
   end
 end