class EacLauncher::Context::InstanceManager::CachedInstances

Public Class Methods

new(content) click to toggle source
# File lib/eac_launcher/context/instance_manager.rb, line 74
def initialize(content)
  @content = content
  @instances = {}
end

Public Instance Methods

by_logical_path(key) click to toggle source
# File lib/eac_launcher/context/instance_manager.rb, line 83
def by_logical_path(key)
  return @instances[key] if @instances.key?(key)

  h = @content[key]
  parent_instance = h[:parent] ? by_logical_path(h[:parent]) : nil
  path = ::EacLauncher::Paths::Logical.from_h(@context, h)
  @instances[key] = ::EacLauncher::Instances::Base.instanciate(path, parent_instance)
end
instances() click to toggle source
# File lib/eac_launcher/context/instance_manager.rb, line 79
def instances
  @content.keys.map { |k| by_logical_path(k) }
end