Sha256: e20221326e4ef95126533cf4c76056514a6ed2d697aa38a749b8eecbe0f72d91

Contents?: true

Size: 527 Bytes

Versions: 5

Compression:

Stored size: 527 Bytes

Contents

# frozen_string_literal: true

require 'eac_cli/core_ext'

module Avm
  module Runners
    class Base
      enable_abstract_methods

      class << self
        def command_argument
          stereotype_name.underscore.dasherize
        end

        def stereotype_name
          name.split('::')[-3]
        end
      end

      delegate :command_argument, :stereotype_name, to: :class

      runner_with :help, :subcommands do
        subcommands
      end

      def to_s
        stereotype_name
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
avm-0.10.0 lib/avm/runners/base.rb
avm-0.9.0 lib/avm/runners/base.rb
avm-0.8.0 lib/avm/runners/base.rb
avm-0.7.0 lib/avm/runners/base.rb
avm-tools-0.110.0 vendor/avm/lib/avm/runners/base.rb