Exception: Bundler::Molinillo::NoSuchDependencyError
- Inherits:
-
ResolverError
- Object
- StandardError
- ResolverError
- Bundler::Molinillo::NoSuchDependencyError
- Defined in:
- lib/bundler/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.
Instance Attribute Summary collapse
-
#dependency ⇒ Object
The dependency that could not be found.
-
#required_by ⇒ Array<Object>
The specifications that depended upon #dependency.
Instance Method Summary collapse
-
#initialize(dependency, required_by = []) ⇒ NoSuchDependencyError
constructor
A new instance of NoSuchDependencyError.
- #message ⇒ Object
Constructor Details
#initialize(dependency, required_by = []) ⇒ NoSuchDependencyError
Returns a new instance of NoSuchDependencyError.
16 17 18 19 20 |
# File 'lib/bundler/vendor/molinillo/lib/molinillo/errors.rb', line 16 def initialize(dependency, required_by = []) @dependency = dependency @required_by = required_by super() end |
Instance Attribute Details
#dependency ⇒ Object
Returns the dependency that could not be found.
9 10 11 |
# File 'lib/bundler/vendor/molinillo/lib/molinillo/errors.rb', line 9 def dependency @dependency end |
#required_by ⇒ Array<Object>
Returns the specifications that depended upon #dependency.
12 13 14 |
# File 'lib/bundler/vendor/molinillo/lib/molinillo/errors.rb', line 12 def required_by @required_by end |
Instance Method Details
#message ⇒ Object
22 23 24 25 26 27 |
# File 'lib/bundler/vendor/molinillo/lib/molinillo/errors.rb', line 22 def sources = required_by.map { |r| "`#{r}`" }.join(' and ') = "Unable to find a specification for `#{dependency}`" << " depended upon by #{sources}" unless sources.empty? end |