Exception: Praxis::Renderer::CircularRenderingError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/praxis/renderer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(object, context) ⇒ CircularRenderingError

Returns a new instance of CircularRenderingError.



10
11
12
13
14
15
16
17
18
# File 'lib/praxis/renderer.rb', line 10

def initialize(object, context)
  @object = object
  @context = context

  first = Attributor.humanize_context(context[0..10])
  last = Attributor.humanize_context(context[-5..])
  pretty_context = "#{first}...#{last}"
  super("SystemStackError in rendering #{object.class} with context: #{pretty_context}")
end

Instance Attribute Details

#contextObject (readonly)

Returns the value of attribute context.



8
9
10
# File 'lib/praxis/renderer.rb', line 8

def context
  @context
end

#objectObject (readonly)

Returns the value of attribute object.



8
9
10
# File 'lib/praxis/renderer.rb', line 8

def object
  @object
end