Exception: RubyJsonParser::SyntaxError

Inherits:
StandardError
  • Object
show all
Extended by:
T::Sig
Defined in:
lib/ruby_json_parser.rb

Overview

JSON syntax error

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(errors) ⇒ SyntaxError

Returns a new instance of SyntaxError.



27
28
29
# File 'lib/ruby_json_parser.rb', line 27

def initialize(errors)
  @errors = errors
end

Instance Attribute Details

#errorsObject (readonly)

Returns the value of attribute errors.



24
25
26
# File 'lib/ruby_json_parser.rb', line 24

def errors
  @errors
end

Instance Method Details

#messageObject



32
33
34
# File 'lib/ruby_json_parser.rb', line 32

def message
  @errors.join('; ')
end