Exception: SchemaTools::CircularReferenceException

Inherits:
Exception
  • Object
show all
Defined in:
lib/schema_tools/schema.rb

Instance Method Summary collapse

Constructor Details

#initialize(fn, offending_ref, stack) ⇒ CircularReferenceException

Returns a new instance of CircularReferenceException.



4
5
6
7
8
# File 'lib/schema_tools/schema.rb', line 4

def initialize fn, offending_ref, stack
  @fn            = fn
  @stack         = stack
  @offending_ref = offending_ref
end

Instance Method Details

#to_sObject



10
11
12
# File 'lib/schema_tools/schema.rb', line 10

def to_s
  "circular reference:  #{@fn} $ref: #{@offending_ref} refers to itself:\n #{@stack.join("\n")}"
end