Exception: Gem::DependencyResolutionError

Inherits:
DependencyError show all
Defined in:
lib/rubygems/exceptions.rb

Overview

Raised by Gem::Resolver when a Gem::Dependency::Conflict reaches the toplevel. Indicates which dependencies were incompatible through #conflict and #conflicting_dependencies

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(conflict) ⇒ DependencyResolutionError

Returns a new instance of DependencyResolutionError.



24
25
26
27
28
29
# File 'lib/rubygems/exceptions.rb', line 24

def initialize(conflict)
  @conflict = conflict
  a, b = conflicting_dependencies

  super "conflicting dependencies #{a} and #{b}\n#{@conflict.explanation}"
end

Instance Attribute Details

#conflictObject (readonly)

Returns the value of attribute conflict.



22
23
24
# File 'lib/rubygems/exceptions.rb', line 22

def conflict
  @conflict
end

Instance Method Details

#conflicting_dependenciesObject



31
32
33
# File 'lib/rubygems/exceptions.rb', line 31

def conflicting_dependencies
  @conflict.conflicting_dependencies
end