Class: RubyGPG2::Commands::Import

Inherits:
Base
  • Object
show all
Includes:
Mixins::BatchConfig, Mixins::GlobalConfig, Mixins::StatusConfig, Mixins::WithCapturedStatus, Mixins::WithResult
Defined in:
lib/ruby_gpg2/commands/import.rb

Instance Method Summary collapse

Methods included from Mixins::WithCapturedStatus

#do_after, #do_around

Methods included from Mixins::WithResult

#do_after

Methods inherited from Base

#execute, #initialize

Constructor Details

This class inherits a constructor from RubyGPG2::Commands::Base

Instance Method Details

#configure_command(builder, opts) ⇒ Object



19
20
21
22
23
24
25
26
27
28
# File 'lib/ruby_gpg2/commands/import.rb', line 19

def configure_command(builder, opts)
  key_file_paths = opts[:key_file_paths] || []

  builder = super(builder, opts)
  builder = builder.with_subcommand('--import')
  key_file_paths.each do |key_file_path|
    builder = builder.with_argument(key_file_path)
  end
  builder
end