Exception: Gem::SpecificGemNotFoundException

Inherits:
GemNotFoundException show all
Defined in:
lib/rubygems/exceptions.rb

Overview

Raised by the DependencyInstaller when a specific gem cannot be found

Instance Attribute Summary collapse

Attributes inherited from Exception

#source_exception

Instance Method Summary collapse

Methods included from Deprecate

deprecate, skip, skip=, skip_during

Constructor Details

#initialize(name, version, errors = nil) ⇒ SpecificGemNotFoundException

Creates a new SpecificGemNotFoundException for a gem with the given name and version. Any errors encountered when attempting to find the gem are also stored.



109
110
111
112
113
114
115
# File 'lib/rubygems/exceptions.rb', line 109

def initialize(name, version, errors=nil)
  super "Could not find a valid gem '#{name}' (#{version}) locally or in a repository"

  @name = name
  @version = version
  @errors = errors
end

Instance Attribute Details

#errorsObject (readonly)

Errors encountered attempting to find the gem.



130
131
132
# File 'lib/rubygems/exceptions.rb', line 130

def errors
  @errors
end

#nameObject (readonly)

The name of the gem that could not be found.



120
121
122
# File 'lib/rubygems/exceptions.rb', line 120

def name
  @name
end

#versionObject (readonly)

The version of the gem that could not be found.



125
126
127
# File 'lib/rubygems/exceptions.rb', line 125

def version
  @version
end