Sha256: 84e83ea320ce9200a51d09205e4c0f0af9b8ef935a2eabb0c65628b0d0941afa

Contents?: true

Size: 953 Bytes

Versions: 262

Compression:

Stored size: 953 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_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
            ::Avm::Launcher::Paths::Logical.from_h(cached_instances.context, data)
          end
        end
      end
    end
  end
end

Version data entries

262 entries across 262 versions & 3 rubygems

Version Path
avm-0.94.1 lib/avm/launcher/context/instance_manager/cached_instance.rb
eac_tools-0.98.0 sub/avm/lib/avm/launcher/context/instance_manager/cached_instance.rb
avm-0.94.0 lib/avm/launcher/context/instance_manager/cached_instance.rb
eac_tools-0.94.0 sub/avm/lib/avm/launcher/context/instance_manager/cached_instance.rb
avm-0.93.0 lib/avm/launcher/context/instance_manager/cached_instance.rb
eac_tools-0.92.0 sub/avm/lib/avm/launcher/context/instance_manager/cached_instance.rb
avm-0.92.0 lib/avm/launcher/context/instance_manager/cached_instance.rb
eac_tools-0.91.0 sub/avm/lib/avm/launcher/context/instance_manager/cached_instance.rb
avm-0.90.1 lib/avm/launcher/context/instance_manager/cached_instance.rb
eac_tools-0.87.1 sub/avm/lib/avm/launcher/context/instance_manager/cached_instance.rb
avm-0.90.0 lib/avm/launcher/context/instance_manager/cached_instance.rb
eac_tools-0.87.0 sub/avm/lib/avm/launcher/context/instance_manager/cached_instance.rb
avm-0.89.0 lib/avm/launcher/context/instance_manager/cached_instance.rb
eac_tools-0.86.12 sub/avm/lib/avm/launcher/context/instance_manager/cached_instance.rb
avm-0.88.0 lib/avm/launcher/context/instance_manager/cached_instance.rb
eac_tools-0.86.11 sub/avm/lib/avm/launcher/context/instance_manager/cached_instance.rb
avm-0.87.0 lib/avm/launcher/context/instance_manager/cached_instance.rb
eac_tools-0.86.8 sub/avm/lib/avm/launcher/context/instance_manager/cached_instance.rb
avm-0.86.2 lib/avm/launcher/context/instance_manager/cached_instance.rb
eac_tools-0.86.7 sub/avm/lib/avm/launcher/context/instance_manager/cached_instance.rb