Class: PuppetfileResolver::ResolutionResult
- Inherits:
-
Object
- Object
- PuppetfileResolver::ResolutionResult
- Defined in:
- lib/puppetfile-resolver/resolution_result.rb
Instance Attribute Summary collapse
-
#dependency_graph ⇒ Object
readonly
Returns the value of attribute dependency_graph.
-
#puppetfile_document ⇒ Object
readonly
Returns the value of attribute puppetfile_document.
Instance Method Summary collapse
-
#initialize(dependency_graph, puppetfile_document) ⇒ ResolutionResult
constructor
A new instance of ResolutionResult.
- #specifications ⇒ Object
- #to_dot ⇒ Object
- #validation_errors ⇒ Object
Constructor Details
#initialize(dependency_graph, puppetfile_document) ⇒ ResolutionResult
Returns a new instance of ResolutionResult.
9 10 11 12 13 |
# File 'lib/puppetfile-resolver/resolution_result.rb', line 9 def initialize(dependency_graph, puppetfile_document) raise "Expected Molinillo::DependencyGraph but got #{dependency_graph.class}" unless dependency_graph.is_a?(Molinillo::DependencyGraph) @dependency_graph = dependency_graph @puppetfile_document = puppetfile_document end |
Instance Attribute Details
#dependency_graph ⇒ Object (readonly)
Returns the value of attribute dependency_graph.
7 8 9 |
# File 'lib/puppetfile-resolver/resolution_result.rb', line 7 def dependency_graph @dependency_graph end |
#puppetfile_document ⇒ Object (readonly)
Returns the value of attribute puppetfile_document.
7 8 9 |
# File 'lib/puppetfile-resolver/resolution_result.rb', line 7 def puppetfile_document @puppetfile_document end |
Instance Method Details
#specifications ⇒ Object
15 16 17 18 19 20 |
# File 'lib/puppetfile-resolver/resolution_result.rb', line 15 def specifications # Note - Later rubies have `.transform_values` however we support old Ruby versions result = {} @dependency_graph.vertices.each { |key, vertex| result[key] = vertex.payload } result end |
#to_dot ⇒ Object
22 23 24 |
# File 'lib/puppetfile-resolver/resolution_result.rb', line 22 def to_dot @dependency_graph.to_dot end |
#validation_errors ⇒ Object
26 27 28 |
# File 'lib/puppetfile-resolver/resolution_result.rb', line 26 def validation_errors @puppetfile_document.resolution_validation_errors(self) end |