lib/wcc/contentful/exceptions.rb in wcc-contentful-1.2.0 vs lib/wcc/contentful/exceptions.rb in wcc-contentful-1.2.1
- old
+ new
@@ -10,12 +10,11 @@
end
# Raised when an entry contains a circular reference and cannot be represented
# as a flat tree.
class CircularReferenceError < StandardError
- attr_reader :stack
- attr_reader :id
+ attr_reader :stack, :id
def initialize(stack, id)
@id = id
@stack = stack.slice(stack.index(id)..stack.length)
super('Circular reference detected!')
@@ -23,10 +22,10 @@
def message
return super unless stack
super + "\n " \
- "#{stack.last} points to #{id} which is also it's ancestor\n " +
+ "#{stack.last} points to #{id} which is also it's ancestor\n " +
stack.join('->')
end
end
# Raised by {WCC::Contentful::ModelMethods#resolve Model#resolve} when attempting