Sha256: 817272d572770b757c5486a2226289ac9c7aa250ab9540f2af2d1fa4689a2010
Contents?: true
Size: 288 Bytes
Versions: 2
Compression:
Stored size: 288 Bytes
Contents
module PEBuild module Idempotent # @param fpath [String] # @param desc [String, nil] def idempotent(fpath, desc = nil, &block) desc ||= fpath if File.exist? fpath @env.ui.warn "#{desc} is already present.", :prefix => true else yield end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
vagrant-pe_build-0.2.0 | lib/pe_build/idempotent.rb |
vagrant-pe_build-0.1.0 | lib/pe_build/idempotent.rb |