Sha256: d6987d3bd924100f17af4e3916b6193fada480026bb1e69efaa1dad6aa149925

Contents?: true

Size: 517 Bytes

Versions: 28

Compression:

Stored size: 517 Bytes

Contents

# frozen_string_literal: true

require 'eac_cli/runner'
require 'eac_ruby_utils/core_ext'

module EacCli
  module RunnerWith
    module OutputFile
      common_concern do
        include ::EacCli::Runner

        runner_definition do
          arg_opt '-o', '--output-file', 'Output to file.'
        end
      end

      def run_output
        if parsed.output_file.present?
          ::File.write(parsed.output_file, output_content)
        else
          out output_content
        end
      end
    end
  end
end

Version data entries

28 entries across 28 versions & 3 rubygems

Version Path
eac_cli-0.12.1 lib/eac_cli/runner_with/output_file.rb
avm-tools-0.77.0 vendor/eac_cli/lib/eac_cli/runner_with/output_file.rb
ehbrs-tools-0.16.1 vendor/eac_cli/lib/eac_cli/runner_with/output_file.rb
eac_cli-0.12.0 lib/eac_cli/runner_with/output_file.rb
eac_cli-0.11.1 lib/eac_cli/runner_with/output_file.rb
avm-tools-0.76.1 vendor/eac_cli/lib/eac_cli/runner_with/output_file.rb
eac_cli-0.11.0 lib/eac_cli/runner_with/output_file.rb
eac_cli-0.10.0 lib/eac_cli/runner_with/output_file.rb
ehbrs-tools-0.16.0 vendor/eac_cli/lib/eac_cli/runner_with/output_file.rb
avm-tools-0.76.0 vendor/eac_cli/lib/eac_cli/runner_with/output_file.rb
avm-tools-0.75.1 vendor/eac_cli/lib/eac_cli/runner_with/output_file.rb
avm-tools-0.75.0 vendor/eac_cli/lib/eac_cli/runner_with/output_file.rb
avm-tools-0.74.1 vendor/eac_cli/lib/eac_cli/runner_with/output_file.rb
avm-tools-0.74.0 vendor/eac_cli/lib/eac_cli/runner_with/output_file.rb
avm-tools-0.73.0 vendor/eac_cli/lib/eac_cli/runner_with/output_file.rb
avm-tools-0.72.0 vendor/eac_cli/lib/eac_cli/runner_with/output_file.rb
eac_cli-0.9.0 lib/eac_cli/runner_with/output_file.rb
avm-tools-0.71.0 vendor/eac_cli/lib/eac_cli/runner_with/output_file.rb
avm-tools-0.70.2 vendor/eac_cli/lib/eac_cli/runner_with/output_file.rb
ehbrs-tools-0.15.0 vendor/eac_cli/lib/eac_cli/runner_with/output_file.rb