Exception: Typhoid::ReadError
- Inherits:
-
StandardError
- Object
- StandardError
- Typhoid::ReadError
- Defined in:
- lib/typhoid/parser.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
Instance Method Summary collapse
-
#initialize(body) ⇒ ReadError
constructor
A new instance of ReadError.
- #to_s ⇒ Object
Constructor Details
#initialize(body) ⇒ ReadError
Returns a new instance of ReadError.
32 33 34 |
# File 'lib/typhoid/parser.rb', line 32 def initialize(body) @body = body end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
31 32 33 |
# File 'lib/typhoid/parser.rb', line 31 def body @body end |
Instance Method Details
#to_s ⇒ Object
36 37 38 |
# File 'lib/typhoid/parser.rb', line 36 def to_s "Could not parse JSON body: #{cleaned_body}" end |