Sha256: 4a87d47b027be820ac49f72563cfc0caa234df63e8b55275b6eed6a6c9d52b3d

Contents?: true

Size: 442 Bytes

Versions: 8

Compression:

Stored size: 442 Bytes

Contents

# frozen_string_literal: true

module RakeGPG
  class Home
    def initialize(work_directory, home_directory)
      @work_directory = work_directory
      @home_directory = home_directory
    end

    def with_resolved_directory(&block)
      if @home_directory == :temporary
        Dir.mktmpdir('home', @work_directory, &block)
      else
        FileUtils.mkdir_p(@home_directory)
        yield @home_directory
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
rake_gpg-0.19.0.pre.4 lib/rake_gpg/home.rb
rake_gpg-0.19.0.pre.3 lib/rake_gpg/home.rb
rake_gpg-0.19.0.pre.2 lib/rake_gpg/home.rb
rake_gpg-0.19.0.pre.1 lib/rake_gpg/home.rb
rake_gpg-0.18.0 lib/rake_gpg/home.rb
rake_gpg-0.17.0.pre.7 lib/rake_gpg/home.rb
rake_gpg-0.17.0.pre.6 lib/rake_gpg/home.rb
rake_gpg-0.17.0.pre.5 lib/rake_gpg/home.rb