Exception: YandexDictionaryApi::ApiError

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(int_code, str_message) ⇒ ApiError

Returns a new instance of ApiError.



7
8
9
10
11
# File 'lib/yandex_dictionary_api/api_error.rb', line 7

def initialize(int_code, str_message)
  @code = int_code
  msg = "Response code: #{int_code}. " + str_message
  super(msg)
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



5
6
7
# File 'lib/yandex_dictionary_api/api_error.rb', line 5

def code
  @code
end