lib/garcon/chef/chef_helpers.rb
# Creates a temp directory executing the block provided. When done the
# temp directory and all it's contents are garbage collected.
#
# @yield [Proc] block
#   A block that will be run
#
# @return [Object]
#   Result of the block operation
#
# @api public
Creates a temp directory executing the block provided. When done the
temp directory and all it's contents are garbage collected.
Creates a temp directory executing the block provided . When done the temp directory and all it ' s contents are garbage collected .
def with_tmp_dir(&block)
      Dir.mktmpdir(SecureRandom.hex(3)) do |tmp_dir|
        Dir.chdir(tmp_dir, &block)
      end
    end
def with_tmp_dir ( & block ) Dir . mktmpdir ( SecureRandom . hex ( 3 ) ) do | tmp_dir | Dir . chdir ( tmp_dir , & block ) end end
Creates a temp directory executing the block provided.
Creates a temp directory executing the block provided .
Result of the block operation
Result of the block operation
Object
block
<not_specific>
]
<not_specific>
block A block that will be run
block A block that will be run
api
None