Class: Build::Dependency::PartialChain

Inherits:
Resolver
  • Object
show all
Defined in:
lib/build/dependency/partial_chain.rb

Instance Attribute Summary collapse

Attributes inherited from Resolver

#conflicts, #ordered, #provisions, #resolved, #unresolved

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(chain, dependencies) ⇒ PartialChain

Returns a new instance of PartialChain.


41
42
43
44
45
46
47
48
49
# File 'lib/build/dependency/partial_chain.rb', line 41

def initialize(chain, dependencies)
	super()
	
	@chain = chain
	
	@dependencies = dependencies.collect{|dependency| Depends[dependency]}
	
	expand_top
end

Instance Attribute Details

#dependenciesObject (readonly)


56
57
58
# File 'lib/build/dependency/partial_chain.rb', line 56

def dependencies
  @dependencies
end

Class Method Details

.expand(*args) ⇒ Object

An `UnresolvedDependencyError` will be thrown if there are any unresolved dependencies.


33
34
35
36
37
38
39
# File 'lib/build/dependency/partial_chain.rb', line 33

def self.expand(*args)
	chain = self.new(*args)
	
	chain.freeze
	
	return chain
end

Instance Method Details

#freezeObject


62
63
64
65
66
67
68
69
# File 'lib/build/dependency/partial_chain.rb', line 62

def freeze
	return unless frozen?
	
	@chain.freeze
	@dependencies.freeze
	
	super
end

#providersObject


58
59
60
# File 'lib/build/dependency/partial_chain.rb', line 58

def providers
	@chain.providers
end

#selectionObject


51
52
53
# File 'lib/build/dependency/partial_chain.rb', line 51

def selection
	@chain.selection
end