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, options = {}) ⇒ Chain

Returns a new instance of Chain.



82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
# File 'lib/teapot/dependency.rb', line 82

def initialize(selection, dependencies, providers, options = {})
  # 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 = {}
  
  @options = options
  
  @dependencies.each do |dependency|
    expand(dependency, "<top>")
  end
end

Instance Attribute Details

#conflictsObject (readonly)

Returns the value of attribute conflicts.



113
114
115
# File 'lib/teapot/dependency.rb', line 113

def conflicts
  @conflicts
end

#dependenciesObject (readonly)

Returns the value of attribute dependencies.



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

def dependencies
  @dependencies
end

#orderedObject (readonly)

Returns the value of attribute ordered.



110
111
112
# File 'lib/teapot/dependency.rb', line 110

def ordered
  @ordered
end

#providersObject (readonly)

Returns the value of attribute providers.



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

def providers
  @providers
end

#provisionsObject (readonly)

Returns the value of attribute provisions.



111
112
113
# File 'lib/teapot/dependency.rb', line 111

def provisions
  @provisions
end

#resolvedObject (readonly)

Returns the value of attribute resolved.



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

def resolved
  @resolved
end

#selectionObject (readonly)

Returns the value of attribute selection.



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

def selection
  @selection
end

#unresolvedObject (readonly)

Returns the value of attribute unresolved.



112
113
114
# File 'lib/teapot/dependency.rb', line 112

def unresolved
  @unresolved
end