Exception: Shift::Api::Core::Errors::ApiError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/shift/api/core/errors.rb

Direct Known Subclasses

ClientError, ConnectionError, ServerError

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(env) ⇒ ApiError

Returns a new instance of ApiError.



10
11
12
# File 'lib/shift/api/core/errors.rb', line 10

def initialize(env)
  @env = env
end

Instance Attribute Details

#envObject (readonly)

Returns the value of attribute env.



9
10
11
# File 'lib/shift/api/core/errors.rb', line 9

def env
  @env
end

Class Method Details

.from_jsonapi_client(ex) ⇒ Object



14
15
16
# File 'lib/shift/api/core/errors.rb', line 14

def self.from_jsonapi_client(ex)
  new(ex.env)
end