class Gem::ConflictError

当加载的 gem 规范存在冲突时引发

属性

conflicts[R]

一个哈希,将冲突的规范映射到导致冲突的依赖项

target[R]

发生冲突的规范

公共类方法

new(target, conflicts) 点击切换源代码
调用父类方法
# File rubygems/errors.rb, line 83
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