Exception: YandexClient::ApiRequestError

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(msg = nil, http_code: nil) ⇒ ApiRequestError

Returns a new instance of ApiRequestError.



25
26
27
28
29
30
31
32
33
# File 'lib/yandex_client.rb', line 25

def initialize(msg = nil, http_code: nil)
  if http_code
    super "#{msg}, (http code #{http_code})"
  else
    super msg
  end

  @http_code = http_code
end

Instance Attribute Details

#http_codeObject (readonly)

Returns the value of attribute http_code.



23
24
25
# File 'lib/yandex_client.rb', line 23

def http_code
  @http_code
end