Class: Gem::SourceFetchProblem

Inherits:
ErrorReason show all
Defined in:
lib/rubygems/errors.rb

Overview

An error that indicates we weren’t able to fetch some data from a source

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(source, error) ⇒ SourceFetchProblem

Returns a new instance of SourceFetchProblem.



78
79
80
81
# File 'lib/rubygems/errors.rb', line 78

def initialize(source, error)
  @source = source
  @error = error
end

Instance Attribute Details

#errorObject (readonly)

Returns the value of attribute error



83
84
85
# File 'lib/rubygems/errors.rb', line 83

def error
  @error
end

#sourceObject (readonly)

Returns the value of attribute source



83
84
85
# File 'lib/rubygems/errors.rb', line 83

def source
  @source
end

Instance Method Details

#wordyObject



85
86
87
# File 'lib/rubygems/errors.rb', line 85

def wordy
  "Unable to download data from #{@source.uri} - #{@error.message}"
end