Sha256: 124a91e7e229289f87e70f95b71de14c4963af1a40a5469bb1f55743163afcf2

Contents?: true

Size: 959 Bytes

Versions: 55

Compression:

Stored size: 959 Bytes

Contents

# frozen_string_literal: true

require 'avm/launcher/instances/base'
require 'eac_ruby_utils/core_ext'

module Avm
  module Launcher
    class Context
      class InstanceManager
        class CachedInstance
          enable_console_speaker
          enable_simple_cache
          common_constructor :cached_instances, :data

          private

          def instance_uncached
            ::Avm::Launcher::Instances::Base.instanciate(path, parent_instance)
          rescue ::Avm::Launcher::Errors::NonProject
            warn "Cached instance \"#{data[:logical]}\" not found"
            nil
          end

          def parent_instance_uncached
            data[:parent]
              .if_present { |v| cached_instances.by_logical_path(v) }
              .if_present(&:instance)
          end

          def path_uncached
            ::EacLauncher::Paths::Logical.from_h(cached_instances.context, data)
          end
        end
      end
    end
  end
end

Version data entries

55 entries across 55 versions & 1 rubygems

Version Path
avm-tools-0.83.0 lib/avm/launcher/context/instance_manager/cached_instance.rb
avm-tools-0.82.1 lib/avm/launcher/context/instance_manager/cached_instance.rb
avm-tools-0.82.0 lib/avm/launcher/context/instance_manager/cached_instance.rb
avm-tools-0.81.0 lib/avm/launcher/context/instance_manager/cached_instance.rb
avm-tools-0.80.0 lib/avm/launcher/context/instance_manager/cached_instance.rb
avm-tools-0.79.0 lib/avm/launcher/context/instance_manager/cached_instance.rb
avm-tools-0.78.0 lib/avm/launcher/context/instance_manager/cached_instance.rb
avm-tools-0.77.0 lib/avm/launcher/context/instance_manager/cached_instance.rb
avm-tools-0.76.1 lib/avm/launcher/context/instance_manager/cached_instance.rb
avm-tools-0.76.0 lib/avm/launcher/context/instance_manager/cached_instance.rb
avm-tools-0.75.1 lib/avm/launcher/context/instance_manager/cached_instance.rb
avm-tools-0.75.0 lib/avm/launcher/context/instance_manager/cached_instance.rb
avm-tools-0.74.1 lib/avm/launcher/context/instance_manager/cached_instance.rb
avm-tools-0.74.0 lib/avm/launcher/context/instance_manager/cached_instance.rb
avm-tools-0.73.0 lib/avm/launcher/context/instance_manager/cached_instance.rb
avm-tools-0.72.0 lib/avm/launcher/context/instance_manager/cached_instance.rb
avm-tools-0.71.0 lib/avm/launcher/context/instance_manager/cached_instance.rb
avm-tools-0.70.2 lib/avm/launcher/context/instance_manager/cached_instance.rb
avm-tools-0.70.1 lib/avm/launcher/context/instance_manager/cached_instance.rb
avm-tools-0.70.0 lib/avm/launcher/context/instance_manager/cached_instance.rb