Module: RubyGPG2::Commands::Mixins::PassphraseConfig

Included in:
Decrypt, ExportSecretKeys, GenerateKey
Defined in:
lib/ruby_gpg2/commands/mixins/passphrase_config.rb

Instance Method Summary collapse

Instance Method Details

#configure_command(builder, opts) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
# File 'lib/ruby_gpg2/commands/mixins/passphrase_config.rb', line 7

def configure_command(builder, opts)
  passphrase = opts[:passphrase]

  builder = super(builder, opts)
  if passphrase
    builder = builder.with_option(
      '--passphrase', passphrase, quoting: '"'
    )
  end
  builder
end