module RubyGPG2::Commands::Mixins::WithCapturedStatus
Public Instance Methods
do_after(opts)
click to toggle source
Calls superclass method
# File lib/ruby_gpg2/commands/mixins/with_captured_status.rb, line 21 def do_after(opts) parse_status = opts[:parse_status].nil? ? true : opts[:parse_status] if opts[:with_status] super(opts.merge( status: parse_status ? StatusOutput.parse(@status) : @status)) else super(opts) end end
do_around(opts) { |merge(status_file: path)| ... }
click to toggle source
# File lib/ruby_gpg2/commands/mixins/with_captured_status.rb, line 9 def do_around(opts) if opts[:with_status] Tempfile.create( 'status-file', opts[:work_directory]) do |f| yield opts.merge(status_file: f.path) @status = File.read(f.path) end else yield opts end end