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