Class: Teapot::Dependency::Chain

Inherits:
Object
  • Object
show all
Defined in:
lib/teapot/dependency.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(selection, dependencies, providers) ⇒ Chain

Returns a new instance of Chain.



79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
# File 'lib/teapot/dependency.rb', line 79

def initialize(selection, dependencies, providers)
	# Explicitly selected targets which will be used when resolving ambiguity:
	@selection = Set.new(selection)
	
	# The list of dependencies that needs to be satisfied:
	@dependencies = dependencies
	
	# The available providers which match up to required dependencies:
	@providers = providers
	
	@resolved = Set.new
	@ordered = []
	@provisions = []
	@unresolved = []
	@conflicts = {}
	
	@dependencies.each do |dependency|
		expand(dependency, "<top>")
	end
end

Instance Attribute Details

#conflictsObject (readonly)

Returns the value of attribute conflicts.



108
109
110
# File 'lib/teapot/dependency.rb', line 108

def conflicts
  @conflicts
end

#dependenciesObject (readonly)

Returns the value of attribute dependencies.



101
102
103
# File 'lib/teapot/dependency.rb', line 101

def dependencies
  @dependencies
end

#orderedObject (readonly)

Returns the value of attribute ordered.



105
106
107
# File 'lib/teapot/dependency.rb', line 105

def ordered
  @ordered
end

#providersObject (readonly)

Returns the value of attribute providers.



102
103
104
# File 'lib/teapot/dependency.rb', line 102

def providers
  @providers
end

#provisionsObject (readonly)

Returns the value of attribute provisions.



106
107
108
# File 'lib/teapot/dependency.rb', line 106

def provisions
  @provisions
end

#resolvedObject (readonly)

Returns the value of attribute resolved.



104
105
106
# File 'lib/teapot/dependency.rb', line 104

def resolved
  @resolved
end

#selectionObject (readonly)

Returns the value of attribute selection.



100
101
102
# File 'lib/teapot/dependency.rb', line 100

def selection
  @selection
end

#unresolvedObject (readonly)

Returns the value of attribute unresolved.



107
108
109
# File 'lib/teapot/dependency.rb', line 107

def unresolved
  @unresolved
end