Sha256: 41f87dd5ea87fe04aa5d6033b6c44351aa78dadf5a43917a5b281ed4b071a16c

Contents?: true

Size: 786 Bytes

Versions: 1

Compression:

Stored size: 786 Bytes

Contents

# frozen_string_literal: true

module RubyGPG2
  module Commands
    module Mixins
      module GlobalConfig
        private

        def parameter_defaults(parameters)
          without_tty = parameters[:without_tty]
          super.merge(without_tty: without_tty.nil? ? true : without_tty)
        end

        def configure_command(builder, parameters)
          home_directory = parameters[:home_directory]
          without_tty = parameters[:without_tty]

          builder = super(builder, parameters)
          if home_directory
            builder = builder.with_option(
              '--homedir', home_directory, quoting: '"'
            )
          end
          builder = builder.with_flag('--no-tty') if without_tty
          builder
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ruby_gpg2-0.11.0.pre.5 lib/ruby_gpg2/commands/mixins/global_config.rb