class DTK::Client::Operation::Module::Install::DependentModules::ComponentDependencyTree::Cache
Public Class Methods
new()
click to toggle source
hash where key unqiuely determines module_refs and value is to hash with keys :module_ref and :dependencies
Calls superclass method
# File lib/client/operation/module/install/dependent_modules/component_dependency_tree/cache.rb, line 22 def initialize super() end
Public Instance Methods
add!(module_ref, dependencies)
click to toggle source
# File lib/client/operation/module/install/dependent_modules/component_dependency_tree/cache.rb, line 26 def add!(module_ref, dependencies) self[index(module_ref)] ||= {:module_ref => module_ref, :dependencies => dependencies } end
all_modules_refs()
click to toggle source
# File lib/client/operation/module/install/dependent_modules/component_dependency_tree/cache.rb, line 34 def all_modules_refs values.map { |hash| hash[:module_ref] } end
lookup_dependencies?(module_ref)
click to toggle source
# File lib/client/operation/module/install/dependent_modules/component_dependency_tree/cache.rb, line 30 def lookup_dependencies?(module_ref) (self[index(module_ref)] || {})[:dependencies] end
Private Instance Methods
index(module_ref)
click to toggle source
# File lib/client/operation/module/install/dependent_modules/component_dependency_tree/cache.rb, line 40 def index(module_ref) "#{module_ref.module_name}--#{module_ref.namespace}--#{module_ref.version}" end