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
-
.new(dependency, required_by = []) ⇒ NoSuchDependencyError
constructor
Initializes a new error with the given missing dependency.
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.
# 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
#dependency ⇒ Object
(rw)
# File 'lib/rubygems/vendor/molinillo/lib/molinillo/errors.rb', line 11
attr_accessor :dependency
#required_by ⇒ Array
<Object
> (rw)
# 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.
# File 'lib/rubygems/vendor/molinillo/lib/molinillo/errors.rb', line 27
def sources = required_by.map { |r| "`#{r}`" }.join(' and ') = "Unable to find a specification for `#{dependency}`" += " depended upon by #{sources}" unless sources.empty? end