Exception: FileTurn::UnprocessableEntityException

Inherits:
FileTurnException show all
Defined in:
lib/fileturn/exceptions.rb

Instance Attribute Summary collapse

Attributes inherited from FileTurnException

#resp

Instance Method Summary collapse

Constructor Details

#initialize(resp) ⇒ UnprocessableEntityException

Returns a new instance of UnprocessableEntityException.



20
21
22
23
# File 'lib/fileturn/exceptions.rb', line 20

def initialize(resp)
  super(resp)
  @parsed_response = OpenStruct.new(JSON.parse(resp.body))
end

Instance Attribute Details

#parsed_responseObject (readonly)

Returns the value of attribute parsed_response.



18
19
20
# File 'lib/fileturn/exceptions.rb', line 18

def parsed_response
  @parsed_response
end

Instance Method Details

#to_sObject



25
26
27
# File 'lib/fileturn/exceptions.rb', line 25

def to_s
  @parsed_response.to_s
end