Exception: Gem::DependencyResolutionError

Inherits:
Exception
  • Object
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

Attributes inherited from Exception

#source_exception

Instance Method Summary collapse

Constructor Details

#initialize(conflict) ⇒ DependencyResolutionError

Returns a new instance of DependencyResolutionError.



34
35
36
37
38
39
# File 'lib/rubygems/exceptions.rb', line 34

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



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

def conflict
  @conflict
end

Instance Method Details

#conflicting_dependenciesObject



41
42
43
# File 'lib/rubygems/exceptions.rb', line 41

def conflicting_dependencies
  @conflict.conflicting_dependencies
end