X-Git-Url: https://git.openstreetmap.org/chef.git/blobdiff_plain/7b2e5c20165878df65a244b7eb34bf6ac1b35782..00d5d525005346f6d6f6f4802e238e9e12412117:/cookbooks/chef/libraries/edit_file.rb diff --git a/cookbooks/chef/libraries/edit_file.rb b/cookbooks/chef/libraries/edit_file.rb index e632bcfd4..8a04a8090 100644 --- a/cookbooks/chef/libraries/edit_file.rb +++ b/cookbooks/chef/libraries/edit_file.rb @@ -6,6 +6,10 @@ class Chef @block = block end + def kind_of?(klass) + klass == String || super + end + def to_s ::File.new(@file).collect do |line| line = @block.call(line) @@ -16,7 +20,7 @@ class Chef class Recipe def edit_file(file, &block) - Chef::Util::EditedFile.new(file, block).to_s + Chef::Util::EditedFile.new(file, block) end end end