--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: ""
comment: 
- !ruby/struct:SM::Flow::P 
  body: Use this function to prevent protentially destructive ruby code from running when the :nowrite flag is set.
- !ruby/struct:SM::Flow::P 
  body: "Example:"
- !ruby/struct:SM::Flow::VERB 
  body: "  when_writing(&quot;Building Project&quot;) do\n    project.build\n  end\n"
- !ruby/struct:SM::Flow::P 
  body: "The following code will build the project under normal conditions. If the nowrite(true) flag is set, then the example will print:"
- !ruby/struct:SM::Flow::VERB 
  body: "     DRYRUN: Building Project\n"
- !ruby/struct:SM::Flow::P 
  body: instead of actually building the project.
full_name: RakeFileUtils#when_writing
is_singleton: false
name: when_writing
params: (msg=nil) {|| ...}
visibility: public
