Sha256: 6b5780ce204473e802f96f75856afb9aa72d9dd19994571e5bcfc1a1f6737317

Contents?: true

Size: 432 Bytes

Versions: 6

Compression:

Stored size: 432 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(&)
      if @home_directory == :temporary
        Dir.mktmpdir('home', @work_directory, &)
      else
        FileUtils.mkdir_p(@home_directory)
        yield @home_directory
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
rake_gpg-0.21.0.pre.2 lib/rake_gpg/home.rb
rake_gpg-0.21.0.pre.1 lib/rake_gpg/home.rb
rake_gpg-0.20.0 lib/rake_gpg/home.rb
rake_gpg-0.19.0.pre.7 lib/rake_gpg/home.rb
rake_gpg-0.19.0.pre.6 lib/rake_gpg/home.rb
rake_gpg-0.19.0.pre.5 lib/rake_gpg/home.rb