Exception: MediawikiApi::HttpError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/mediawiki_api/exceptions.rb

Overview

for errors from HTTP requests

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(status) ⇒ HttpError

Returns a new instance of HttpError.


36
37
38
# File 'lib/mediawiki_api/exceptions.rb', line 36

def initialize(status)
  @status = status
end

Instance Attribute Details

#statusObject (readonly)

Returns the value of attribute status


34
35
36
# File 'lib/mediawiki_api/exceptions.rb', line 34

def status
  @status
end

Instance Method Details

#to_sObject


40
41
42
# File 'lib/mediawiki_api/exceptions.rb', line 40

def to_s
  "unexpected HTTP response (#{status})"
end