Module: RubyGPG2::Commands::Mixins::WithCapturedOutput

Included in:
ListPublicKeys, ListSecretKeys
Defined in:
lib/ruby_gpg2/commands/mixins/with_captured_output.rb

Instance Method Summary collapse

Instance Method Details

#do_after(opts) ⇒ Object



15
16
17
# File 'lib/ruby_gpg2/commands/mixins/with_captured_output.rb', line 15

def do_after(opts)
  super(opts.merge(output: resolve_output(stdout.string, opts)))
end

#initialize(*args) ⇒ Object



9
10
11
12
13
# File 'lib/ruby_gpg2/commands/mixins/with_captured_output.rb', line 9

def initialize(*args)
  super(*args)
  @stdout = StringIO.new unless
      defined?(@stdout) && @stdout.respond_to?(:string)
end