Sha256: e4015c129e5ca119bd1140989ce81659c15282bee2f255dffbdfb2e4aead8ce6
Contents?: true
Size: 903 Bytes
Versions: 18
Compression:
Stored size: 903 Bytes
Contents
# frozen_string_literal: true require 'eac_cli/core_ext' require 'eac_ruby_utils/console/docopt_runner' module Avm module Instances class Runner < ::EacRubyUtils::Console::DocoptRunner 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 runner_with description = "Utilities for #{stereotype_name} instances." runner_definition 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(options.fetch('<instance-id>')) end end end end
Version data entries
18 entries across 18 versions & 1 rubygems