Sha256: 7ec5366307eb340a0d7495a029a98a272591d25d83b421365ca6deb07f9341ac
Contents?: true
Size: 655 Bytes
Versions: 8
Compression:
Stored size: 655 Bytes
Contents
# frozen_string_literal: true require 'stringio' module RubyGPG2 module Commands module Mixins module WithCapturedOutput def initialize(*args) super(*args) @stdout = StringIO.new unless defined?(@stdout) && @stdout.respond_to?(:string) end def do_after(opts) super(opts.merge(output: resolve_output(stdout.string, opts))) end private def resolve_output(output, opts) parse_output = opts[:parse_output].nil? ? true : opts[:parse_output] parse_output ? ColonOutput.parse(output) : output end end end end end
Version data entries
8 entries across 8 versions & 1 rubygems