Exception: JSON::JSONRepairError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/json/repair.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message = nil, position = nil) ⇒ JSONRepairError

Returns a new instance of JSONRepairError.



12
13
14
15
# File 'lib/json/repair.rb', line 12

def initialize(message = nil, position = nil)
  super(message && position ? "#{message} at index #{position}" : message)
  @position = position
end

Instance Attribute Details

#positionObject (readonly)

Returns the value of attribute position.



10
11
12
# File 'lib/json/repair.rb', line 10

def position
  @position
end