Exception: SimpleSDKBuilder::Error

Inherits:
StandardError
  • Object
show all
Defined in:
lib/simple_sdk_builder/errors.rb

Overview

An abstract super-class of all other SimpleSDKBuilder Error classes

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ Error

Returns a new instance of Error.



9
10
11
12
13
14
15
16
# File 'lib/simple_sdk_builder/errors.rb', line 9

def initialize(response)
  if response.is_a?(Typhoeus::Response)
    @code = response.code
    super(response.body)
  else
    super(response.to_s)
  end
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



7
8
9
# File 'lib/simple_sdk_builder/errors.rb', line 7

def code
  @code
end