class Gem::Resolver::Molinillo::NoSuchDependencyError

An error caused by searching for a dependency that is completely unknown, i.e. has no versions available whatsoever.

Attributes

dependency[RW]

@return [Object] the dependency that could not be found

required_by[RW]

@return [Array<Object>] the specifications that depended upon {#dependency}

Public Class Methods

new(dependency, required_by = []) click to toggle source

@param [Object] dependency @see {#dependency} @param [Array<Object>] #required_by @see {#required_by}

Calls superclass method
# File lib/rubygems/resolver/molinillo/lib/molinillo/errors.rb, line 16
def initialize(dependency, required_by = [])
  @dependency = dependency
  @required_by = required_by
  super()
end

Public Instance Methods

message() click to toggle source
# File lib/rubygems/resolver/molinillo/lib/molinillo/errors.rb, line 22
def message
  sources = required_by.map { |r| "`#{r}`" }.join(' and ')
  message = "Unable to find a specification for `#{dependency}`"
  message << " depended upon by #{sources}" unless sources.empty?
  message
end