Exception: Anilibria::Api::Exceptions::AuthError

Inherits:
Base
  • Object
show all
Defined in:
lib/anilibria/api/exceptions/auth_error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data = {}) ⇒ AuthError

Returns a new instance of AuthError.



7
8
9
10
11
# File 'lib/anilibria/api/exceptions/auth_error.rb', line 7

def initialize(data = {})
  @data = data

  super("#{mes} (#{key})")
end

Instance Attribute Details

#dataObject (readonly)

Returns the value of attribute data.



5
6
7
# File 'lib/anilibria/api/exceptions/auth_error.rb', line 5

def data
  @data
end

Instance Method Details

#errObject



13
14
15
# File 'lib/anilibria/api/exceptions/auth_error.rb', line 13

def err
  data[:err]
end

#keyObject



21
22
23
# File 'lib/anilibria/api/exceptions/auth_error.rb', line 21

def key
  data[:key]
end

#mesObject



17
18
19
# File 'lib/anilibria/api/exceptions/auth_error.rb', line 17

def mes
  data[:mes]
end