vendor/bundle/ruby/2.5.0/gems/rake-13.0.1/lib/rake/file_utils_ext.rb
def when_writing(msg=nil)
      if FileUtilsExt.nowrite_flag
        $stderr.puts "DRYRUN: #{msg}" if msg
      else
        yield
      end
    end
# Use this function to prevent potentially destructive ruby code
# from running when the :nowrite flag is set.
#
# Example:
#
#   when_writing("Building Project") do
#     project.build
#   end
#
# The following code will build the project under normal
# conditions. If the nowrite(true) flag is set, then the example
# will print:
#
#      DRYRUN: Building Project
#
# instead of actually building the project.
#
Use this function to prevent potentially destructive ruby code
from running when the :nowrite flag is set.



when_writing("Building Project") do
project.build
end

The following code will build the project under normal
conditions. If the nowrite(true) flag is set, then the example
will print.

Building Project

instead of actually building the project.
Use this function to prevent potentially destructive ruby code from running when the : nowrite flag is set . when_writing ( " Building Project " ) do project . build end The following code will build the project under normal conditions . If the nowrite ( true ) flag is set then the example will print . Building Project instead of actually building the project .
def when_writing(msg=nil)
      if FileUtilsExt.nowrite_flag
        $stderr.puts "DRYRUN: #{msg}" if msg
      else
        yield
      end
    end
def when_writing ( msg = nil ) if FileUtilsExt . nowrite_flag $stderr . puts "DRYRUN: #{msg}" if msg else yield end end
Use this function to prevent potentially destructive ruby code
from running when the :nowrite flag is set.
Use this function to prevent potentially destructive ruby code from running when the : nowrite flag is set .
msg