Class: RestCore::JsonResponse::ParseError
- Inherits:
-
Object
- Object
- RestCore::JsonResponse::ParseError
- Defined in:
- lib/rest-core/middleware/json_response.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#cause ⇒ Object
readonly
Returns the value of attribute cause.
Instance Method Summary collapse
-
#initialize(cause, body) ⇒ ParseError
constructor
A new instance of ParseError.
Constructor Details
#initialize(cause, body) ⇒ ParseError
Returns a new instance of ParseError.
11 12 13 14 15 |
# File 'lib/rest-core/middleware/json_response.rb', line 11 def initialize cause, body msg = cause..force_encoding('utf-8') super("#{msg}\nOriginal text: #{body}") @cause, @body = cause, body end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
10 11 12 |
# File 'lib/rest-core/middleware/json_response.rb', line 10 def body @body end |
#cause ⇒ Object (readonly)
Returns the value of attribute cause.
10 11 12 |
# File 'lib/rest-core/middleware/json_response.rb', line 10 def cause @cause end |