Exception: AllGems::GemWorker::FetchError

Inherits:
Error
  • Object
show all
Defined in:
lib/allgems/GemWorker.rb

Overview

Exception class for failed gem fetching

Instance Attribute Summary collapse

Attributes inherited from Error

#original

Instance Method Summary collapse

Constructor Details

#initialize(gn, gv, u, e = nil) ⇒ FetchError

Returns a new instance of FetchError.



217
218
219
220
221
222
# File 'lib/allgems/GemWorker.rb', line 217

def initialize(gn, gv, u, e=nil)
    super(e)
    @gem_name = gn
    @gem_version = gv
    @uri = u
end

Instance Attribute Details

#gem_nameObject (readonly)

Returns the value of attribute gem_name.



216
217
218
# File 'lib/allgems/GemWorker.rb', line 216

def gem_name
  @gem_name
end

#gem_versionObject (readonly)

Returns the value of attribute gem_version.



216
217
218
# File 'lib/allgems/GemWorker.rb', line 216

def gem_version
  @gem_version
end

#uriObject (readonly)

Returns the value of attribute uri.



216
217
218
# File 'lib/allgems/GemWorker.rb', line 216

def uri
  @uri
end

Instance Method Details

#to_sObject



223
224
225
# File 'lib/allgems/GemWorker.rb', line 223

def to_s
    "Failed to fetch #{@gem_name}-#{@gem_version}.gem from #{uri}"
end