Sha256: 0c935d08b4e1f3a771df02269b030bd8f6d550c53ffffb7f20d314479764de49

Contents?: true

Size: 1.01 KB

Versions: 20

Compression:

Stored size: 1.01 KB

Contents

# frozen_string_literal: true

require 'avm/instances/entry_keys'
require 'eac_cli/core_ext'
require 'eac_ruby_utils/console/docopt_runner'

module Avm
  module Tools
    class Runner < ::EacRubyUtils::Console::DocoptRunner
      class Instance < ::EacRubyUtils::Console::DocoptRunner
        class Info < ::EacRubyUtils::Console::DocoptRunner
          runner_with

          runner_definition do
            desc 'Show info about a instance.'
          end

          def run
            base_banner
            entry_keys_banner
          end

          private

          def base_banner
            infov 'ID', instance.id
            infov 'Application ID', instance.application.id
            infov 'Suffix', instance.suffix
          end

          def entry_keys_banner
            ::Avm::Instances::EntryKeys.all.each do |key|
              infov key, instance.read_entry_optional(key)
            end
          end

          def instance
            context(:instance)
          end
        end
      end
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
avm-tools-0.86.0 lib/avm/tools/runner/instance/info.rb
avm-tools-0.85.1 lib/avm/tools/runner/instance/info.rb
avm-tools-0.85.0 lib/avm/tools/runner/instance/info.rb
avm-tools-0.84.0 lib/avm/tools/runner/instance/info.rb
avm-tools-0.83.0 lib/avm/tools/runner/instance/info.rb
avm-tools-0.82.1 lib/avm/tools/runner/instance/info.rb
avm-tools-0.82.0 lib/avm/tools/runner/instance/info.rb
avm-tools-0.81.0 lib/avm/tools/runner/instance/info.rb
avm-tools-0.80.0 lib/avm/tools/runner/instance/info.rb
avm-tools-0.79.0 lib/avm/tools/runner/instance/info.rb
avm-tools-0.78.0 lib/avm/tools/runner/instance/info.rb
avm-tools-0.77.0 lib/avm/tools/runner/instance/info.rb
avm-tools-0.76.1 lib/avm/tools/runner/instance/info.rb
avm-tools-0.76.0 lib/avm/tools/runner/instance/info.rb
avm-tools-0.75.1 lib/avm/tools/runner/instance/info.rb
avm-tools-0.75.0 lib/avm/tools/runner/instance/info.rb
avm-tools-0.74.1 lib/avm/tools/runner/instance/info.rb
avm-tools-0.74.0 lib/avm/tools/runner/instance/info.rb
avm-tools-0.73.0 lib/avm/tools/runner/instance/info.rb
avm-tools-0.72.0 lib/avm/tools/runner/instance/info.rb