Method: GoCardlessPro::Error#initialize

Defined in:
lib/gocardless_pro/error.rb

#initialize(error) ⇒ Error

intialize a new error  @param error the error from the API

Raises:

  • (ArgumentError)


8
9
10
11
12
# File 'lib/gocardless_pro/error.rb', line 8

def initialize(error)
  raise ArgumentError, 'GoCardless errors expect a hash' unless error.is_a?(Hash)

  @error = error
end