-class Chef
+module OpenStreetMap
module Mixin
module EditFile
- def edit_file(file, &block)
+ def edit_file(file, &_block)
Chef::DelayedEvaluator.new do
::File.new(file).collect do |line|
- block.call(line)
+ yield line
end.join("")
end
end
end
end
-
- class Recipe
- include Chef::Mixin::EditFile
- end
end
+
+Chef::DSL::Recipe.include(OpenStreetMap::Mixin::EditFile)