Exception: Gem::ConflictError
- Defined in:
 - lib/rubygems/errors.rb
 
Overview
Raised when there are conflicting gem specs loaded
Instance Attribute Summary collapse
- 
  
    
      #conflicts  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
A Hash mapping conflicting specifications to the dependencies that caused the conflict.
 - 
  
    
      #target  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
The specification that had the conflict.
 
Attributes inherited from LoadError
Instance Method Summary collapse
- 
  
    
      #initialize(target, conflicts)  ⇒ ConflictError 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
A new instance of ConflictError.
 
Constructor Details
#initialize(target, conflicts) ⇒ ConflictError
Returns a new instance of ConflictError.
      82 83 84 85 86 87 88 89 90 91 92 93 94  | 
    
      # File 'lib/rubygems/errors.rb', line 82 def initialize(target, conflicts) @target = target @conflicts = conflicts @name = target.name reason = conflicts.map do |act, dependencies| "#{act.full_name} conflicts with #{dependencies.join(", ")}" end.join ", " # TODO: improve message by saying who activated `con` super("Unable to activate #{target.full_name}, because #{reason}") end  | 
  
Instance Attribute Details
#conflicts ⇒ Object (readonly)
A Hash mapping conflicting specifications to the dependencies that caused the conflict
      75 76 77  | 
    
      # File 'lib/rubygems/errors.rb', line 75 def conflicts @conflicts end  | 
  
#target ⇒ Object (readonly)
The specification that had the conflict
      80 81 82  | 
    
      # File 'lib/rubygems/errors.rb', line 80 def target @target end  |