123456789_123456789_123456789_123456789_123456789_

Exception: Gem::Molinillo::NoSuchDependencyError

Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
self, ResolverError, StandardError
Instance Chain:
self, ResolverError, StandardError
Inherits: Gem::Molinillo::ResolverError
Defined in: lib/rubygems/vendor/molinillo/lib/molinillo/errors.rb

Overview

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

Class Method Summary

Instance Attribute Summary

Instance Method Summary

  • #message

    The error message for the missing dependency, including the specifications that had this dependency.

Constructor Details

.new(dependency, required_by = []) ⇒ NoSuchDependencyError

Initializes a new error with the given missing dependency.

Parameters:

[ GitHub ]

  
# File 'lib/rubygems/vendor/molinillo/lib/molinillo/errors.rb', line 19

def initialize(dependency, required_by = [])
  @dependency = dependency
  @required_by = required_by.uniq
  super()
end

Instance Attribute Details

#dependencyObject (rw)

Returns:

  • (Object)

    the dependency that could not be found

[ GitHub ]

  
# File 'lib/rubygems/vendor/molinillo/lib/molinillo/errors.rb', line 11

attr_accessor :dependency

#required_byArray<Object> (rw)

Returns:

  • (Array<Object>)

    the specifications that depended upon #dependency

[ GitHub ]

  
# File 'lib/rubygems/vendor/molinillo/lib/molinillo/errors.rb', line 14

attr_accessor :required_by

Instance Method Details

#message

The error message for the missing dependency, including the specifications that had this dependency.

[ GitHub ]

  
# File 'lib/rubygems/vendor/molinillo/lib/molinillo/errors.rb', line 27

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