Exception: Financo::N26::ClientError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/financo/n26/client_error.rb

Overview

ClientError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(code, body) ⇒ ClientError

Returns a new instance of ClientError.



9
10
11
12
13
14
# File 'lib/financo/n26/client_error.rb', line 9

def initialize(code, body)
  super("#{code}\n#{body}")

  @code = code
  @body = body
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



7
8
9
# File 'lib/financo/n26/client_error.rb', line 7

def body
  @body
end

#codeObject (readonly)

Returns the value of attribute code.



7
8
9
# File 'lib/financo/n26/client_error.rb', line 7

def code
  @code
end

Instance Method Details

#to_sObject



16
17
18
# File 'lib/financo/n26/client_error.rb', line 16

def to_s
  puts "code [#{@code}], body [#{@body}]"
end