Sha256: ac9dd3b5924f19565d80e75589bb417ca243693913879ff28f6d7a8eb8b6b58f

Contents?: true

Size: 1.05 KB

Versions: 54

Compression:

Stored size: 1.05 KB

Contents

# frozen_string_literal: true

require 'avm/instances/runner'
require 'eac_cli/core_ext'

module Avm
  module Tools
    class Runner
      class Instance < ::Avm::Instances::Runner
        class Data
          class Unit
            require_sub __FILE__
            runner_with :help, :subcommands do
              pos_arg :identifier
              subcommands
            end

            for_context :data_owner

            # @return [Enumerable<String>]
            def available_units_ids
              data_package.units_ids
            end

            # @return [Avm::Instances::Data::Package]
            def data_package
              runner_context.call(:instance).data_package
            end

            # @return [Avm::Instances::Data::Unit]
            def data_owner
              data_package.unit(parsed.identifier)
            end

            # @return [String]
            def help_extra_text
              help_join_sections(super, list_section('Available units', available_units_ids))
            end
          end
        end
      end
    end
  end
end

Version data entries

54 entries across 54 versions & 2 rubygems

Version Path
avm-tools-0.162.0 lib/avm/tools/runner/instance/data/unit.rb
eac_tools-0.94.0 sub/avm-tools/lib/avm/tools/runner/instance/data/unit.rb
avm-tools-0.161.0 lib/avm/tools/runner/instance/data/unit.rb
eac_tools-0.86.5 sub/avm-tools/lib/avm/tools/runner/instance/data/unit.rb
avm-tools-0.160.2 lib/avm/tools/runner/instance/data/unit.rb
eac_tools-0.86.4 sub/avm-tools/lib/avm/tools/runner/instance/data/unit.rb
eac_tools-0.86.3 sub/avm-tools/lib/avm/tools/runner/instance/data/unit.rb
avm-tools-0.160.1 lib/avm/tools/runner/instance/data/unit.rb
eac_tools-0.86.2 sub/avm-tools/lib/avm/tools/runner/instance/data/unit.rb
eac_tools-0.86.1 sub/avm-tools/lib/avm/tools/runner/instance/data/unit.rb
avm-tools-0.160.0 lib/avm/tools/runner/instance/data/unit.rb
eac_tools-0.86.0 sub/avm-tools/lib/avm/tools/runner/instance/data/unit.rb
eac_tools-0.85.1 sub/avm-tools/lib/avm/tools/runner/instance/data/unit.rb
avm-tools-0.159.1 lib/avm/tools/runner/instance/data/unit.rb
eac_tools-0.85.0 sub/avm-tools/lib/avm/tools/runner/instance/data/unit.rb
eac_tools-0.84.2 sub/avm-tools/lib/avm/tools/runner/instance/data/unit.rb
eac_tools-0.84.1 sub/avm-tools/lib/avm/tools/runner/instance/data/unit.rb
eac_tools-0.84.0 sub/avm-tools/lib/avm/tools/runner/instance/data/unit.rb
eac_tools-0.83.0 sub/avm-tools/lib/avm/tools/runner/instance/data/unit.rb
avm-tools-0.159.0 lib/avm/tools/runner/instance/data/unit.rb