class Bundler::Molinillo::VersionConflict - bundler-1.15.4 Documentation

# class Bundler::Molinillo::VersionConflict

An error caused by conflicts in version

### Attributes

conflicts[R]

@return [{String => Resolution::Conflict}] the conflicts that caused

    resolution to fail

### Public Class Methods

new(conflicts) click to toggle source

Initializes a new error with the given version conflicts. @param [{String => Resolution::Conflict}] conflicts see {#conflicts}

Calls superclass method

    # File lib/bundler/vendor/molinillo/lib/molinillo/errors.rb, line 59
    def initialize(conflicts)
      pairs = []
      conflicts.values.flatten.map(&:requirements).flatten.each do |conflicting|
        conflicting.each do |source, conflict_requirements|
          conflict_requirements.each do |c|
            pairs << [c, source]
          end
        end
      end

      super "Unable to satisfy the following requirements:\n\n"          "#{pairs.map { |r, d| "- `#{r}` required by `#{d}`" }.join("\n")}"
      @conflicts = conflicts
    end