Module: Axn::Internal::RenderedClassName
- Defined in:
- lib/axn/exceptions.rb
Overview
A caller-supplied value's CLASS written into prose, with both halves an error path owes composed: the
name comes from ClassName so nothing the value defines runs, and the bytes it answers with are
RENDERED, because a constant may hold non-UTF-8 ones (Object.const_set(:"Caf\xE9", Class.new) is
accepted and Module#to_s hands those back) and those cannot be joined to axn's UTF-8 prose at all.
The ONE owner of that composition, and Internal::Rendering.class_name delegates to it. The dependency can
only run that way: rendering.rb requires this file, so a message path here that delegated UP to it would
be a require cycle — and LIFTING the composition onto ClassName instead breaks that module's promise never
to render anything (see its own header). Living here is neither, and it sits in the file every caller
already loads: every message below that names a caller-supplied value's class,
Internal::Reflection::Values.describe_key_classes, and Rendering itself.
Class Method Summary collapse
Class Method Details
.of(value) ⇒ Object
57 |
# File 'lib/axn/exceptions.rb', line 57 def self.of(value) = Text.renderable(ClassName.of(value)) |