Sha256: 0ac02525f133ff52e33e800839d833baf12a9c8aa9c87676ef938206f00a3069

Contents?: true

Size: 746 Bytes

Versions: 23

Compression:

Stored size: 746 Bytes

Contents

# frozen_string_literal: true

require 'eac_cli/default_runner'
require 'eac_ruby_utils/core_ext'

module EacRubyBase0
  module Runner
    require_sub __FILE__
    common_concern do
      include ::EacCli::DefaultRunner
      runner_definition do
        bool_opt '-q', '--quiet', 'Quiet mode.'
        subcommands
        alt do
          bool_opt '-V', '--version', 'Show version.'
        end
      end
    end

    def run
      on_speaker_node do |node|
        node.stderr = ::StringIO.new if options.fetch('--quiet')
        if options.fetch('--version')
          show_version
        else
          run_with_subcommand
        end
      end
    end

    def show_version
      out(context(:application).version + "\n")
    end
  end
end

Version data entries

23 entries across 23 versions & 2 rubygems

Version Path
avm-tools-0.69.1 vendor/eac_ruby_base0/lib/eac_ruby_base0/runner.rb
avm-tools-0.69.0 vendor/eac_ruby_base0/lib/eac_ruby_base0/runner.rb
avm-tools-0.68.0 vendor/eac_ruby_base0/lib/eac_ruby_base0/runner.rb
avm-tools-0.67.0 vendor/eac_ruby_base0/lib/eac_ruby_base0/runner.rb
avm-tools-0.66.0 vendor/eac_ruby_base0/lib/eac_ruby_base0/runner.rb
avm-tools-0.65.0 vendor/eac_ruby_base0/lib/eac_ruby_base0/runner.rb
avm-tools-0.64.2 vendor/eac_ruby_base0/lib/eac_ruby_base0/runner.rb
avm-tools-0.64.1 vendor/eac_ruby_base0/lib/eac_ruby_base0/runner.rb
avm-tools-0.64.0 vendor/eac_ruby_base0/lib/eac_ruby_base0/runner.rb
avm-tools-0.63.0 vendor/eac_ruby_base0/lib/eac_ruby_base0/runner.rb
avm-tools-0.62.4 vendor/eac_ruby_base0/lib/eac_ruby_base0/runner.rb
avm-tools-0.62.3 vendor/eac_ruby_base0/lib/eac_ruby_base0/runner.rb
avm-tools-0.62.2 vendor/eac_ruby_base0/lib/eac_ruby_base0/runner.rb
avm-tools-0.62.1 vendor/eac_ruby_base0/lib/eac_ruby_base0/runner.rb
avm-tools-0.62.0 vendor/eac_ruby_base0/lib/eac_ruby_base0/runner.rb
avm-tools-0.61.0 vendor/eac_ruby_base0/lib/eac_ruby_base0/runner.rb
avm-tools-0.60.0 vendor/eac_ruby_base0/lib/eac_ruby_base0/runner.rb
avm-tools-0.59.0 vendor/eac_ruby_base0/lib/eac_ruby_base0/runner.rb
avm-tools-0.58.1 vendor/eac_ruby_base0/lib/eac_ruby_base0/runner.rb
avm-tools-0.58.0 vendor/eac_ruby_base0/lib/eac_ruby_base0/runner.rb