Exception: Gem::SpecificGemNotFoundException

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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.



113
114
115
116
117
118
119
# File 'lib/rubygems/exceptions.rb', line 113

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.



134
135
136
# File 'lib/rubygems/exceptions.rb', line 134

def errors
  @errors
end

#nameObject (readonly)

The name of the gem that could not be found.



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

def name
  @name
end

#versionObject (readonly)

The version of the gem that could not be found.



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

def version
  @version
end