Exception: Typhoid::ReadError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/typhoid/parser.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#bodyObject (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_sObject



36
37
38
# File 'lib/typhoid/parser.rb', line 36

def to_s
  "Could not parse JSON body: #{cleaned_body}"
end