Class: Avm::Launcher::Context::InstanceManager::CachedInstances

Inherits:
Object
  • Object
show all
Defined in:
lib/avm/launcher/context/instance_manager/cached_instances.rb

Instance Method Summary collapse

Instance Method Details

#by_logical_path(key) ⇒ Object



18
19
20
21
22
23
24
# File 'lib/avm/launcher/context/instance_manager/cached_instances.rb', line 18

def by_logical_path(key)
  cached_instances[key].if_blank do
    cached_instances[key] = ::Avm::Launcher::Context::InstanceManager::CachedInstance.new(
      self, content.fetch(key)
    )
  end
end

#instancesObject



14
15
16
# File 'lib/avm/launcher/context/instance_manager/cached_instances.rb', line 14

def instances
  content.keys.map { |k| by_logical_path(k).instance }.compact_blank
end