class SemanticPuppet::Dependency::UnsatisfiableGraph
Attributes
graph[R]
Public Class Methods
new(graph)
click to toggle source
Calls superclass method
# File lib/semantic_puppet/dependency/unsatisfiable_graph.rb, line 8 def initialize(graph) @graph = graph deps = sentence_from_list(graph.modules) super "Could not find satisfying releases for #{deps}" end
Private Instance Methods
sentence_from_list(list)
click to toggle source
# File lib/semantic_puppet/dependency/unsatisfiable_graph.rb, line 17 def sentence_from_list(list) case list.length when 1 list.first when 2 list.join(' and ') else list = list.dup list.push("and #{list.pop}") list.join(', ') end end