Sha256: 5fba469dfb7dd1591bd42a06cdf6d0e2b9e0a66ec1867160f658f35693f85897

Contents?: true

Size: 850 Bytes

Versions: 68

Compression:

Stored size: 850 Bytes

Contents

# frozen_string_literal: true

require 'avm/runners/base'
require 'eac_cli/core_ext'

module Avm
  module Instances
    class Runner < ::Avm::Runners::Base
      class << self
        def instance_class
          ::Avm.const_get(stereotype_name).const_get('Instance')
        end

        def stereotype_module
          ::Avm.const_get(stereotype_name)
        end

        def stereotype_name
          name.demodulize
        end
      end

      description = "Utilities for #{stereotype_name} instances."
      runner_with :help, :subcommands do
        desc description
        pos_arg 'instance-id'
        subcommands
      end

      delegate :instance_class, :stereotype_module, :stereotype_name, to: :class

      private

      def instance_uncached
        self.class.instance_class.by_id(parsed.instance_id)
      end
    end
  end
end

Version data entries

68 entries across 68 versions & 3 rubygems

Version Path
eac_tools-0.21.0 sub/avm/lib/avm/instances/runner.rb
eac_tools-0.20.0 sub/avm/lib/avm/instances/runner.rb
eac_tools-0.19.0 sub/avm/lib/avm/instances/runner.rb
avm-0.35.0 lib/avm/instances/runner.rb
eac_tools-0.18.0 sub/avm/lib/avm/instances/runner.rb
avm-0.34.0 lib/avm/instances/runner.rb
eac_tools-0.17.0 sub/avm/lib/avm/instances/runner.rb
eac_tools-0.16.1 sub/avm/lib/avm/instances/runner.rb
eac_tools-0.16.0 sub/avm/lib/avm/instances/runner.rb
avm-0.33.0 lib/avm/instances/runner.rb
eac_tools-0.15.0 sub/avm/lib/avm/instances/runner.rb
avm-0.32.0 lib/avm/instances/runner.rb
eac_tools-0.14.0 sub/avm/lib/avm/instances/runner.rb
avm-0.31.0 lib/avm/instances/runner.rb
eac_tools-0.13.0 sub/avm/lib/avm/instances/runner.rb
avm-0.30.0 lib/avm/instances/runner.rb
eac_tools-0.12.0 sub/avm/lib/avm/instances/runner.rb
eac_tools-0.11.1 sub/avm/lib/avm/instances/runner.rb
avm-0.29.0 lib/avm/instances/runner.rb
eac_tools-0.11.0 sub/avm/lib/avm/instances/runner.rb