Class: Brickwall::API::Error

Inherits:
Struct
  • Object
show all
Defined in:
lib/brickwall/api/error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#codeObject

Returns the value of attribute code

Returns:

  • (Object)

    the current value of code



3
4
5
# File 'lib/brickwall/api/error.rb', line 3

def code
  @code
end

#errorObject

Returns the value of attribute error

Returns:

  • (Object)

    the current value of error



3
4
5
# File 'lib/brickwall/api/error.rb', line 3

def error
  @error
end

#typeObject

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



3
4
5
# File 'lib/brickwall/api/error.rb', line 3

def type
  @type
end

Instance Method Details

#user_error?Boolean

Returns:

  • (Boolean)


6
7
8
9
10
11
12
13
# File 'lib/brickwall/api/error.rb', line 6

def user_error?
  case code
  when 3003..3112 then true
  when 3200 then true
  when 5000 then true
  else false
  end
end