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



15
16
17
18
19
20
21
# File 'lib/avm/launcher/context/instance_manager/cached_instances.rb', line 15

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



11
12
13
# File 'lib/avm/launcher/context/instance_manager/cached_instances.rb', line 11

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