Exception: Bundler::PubGrub::SolveFailure

Inherits:
StandardError
  • Object
show all
Defined in:
lib/bundler/vendor/pub_grub/lib/pub_grub/solve_failure.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(incompatibility) ⇒ SolveFailure

Returns a new instance of SolveFailure.



7
8
9
# File 'lib/bundler/vendor/pub_grub/lib/pub_grub/solve_failure.rb', line 7

def initialize(incompatibility)
  @incompatibility = incompatibility
end

Instance Attribute Details

#incompatibilityObject (readonly)

Returns the value of attribute incompatibility.



5
6
7
# File 'lib/bundler/vendor/pub_grub/lib/pub_grub/solve_failure.rb', line 5

def incompatibility
  @incompatibility
end

Instance Method Details

#explanationObject



15
16
17
# File 'lib/bundler/vendor/pub_grub/lib/pub_grub/solve_failure.rb', line 15

def explanation
  @explanation ||= FailureWriter.new(@incompatibility).write
end

#to_sObject



11
12
13
# File 'lib/bundler/vendor/pub_grub/lib/pub_grub/solve_failure.rb', line 11

def to_s
  "Could not find compatible versions\n\n#{explanation}"
end