Module: Axn::Core::Naming::ClassMethods
- Defined in:
- lib/axn/core/naming.rb
Constant Summary collapse
- NOT_SET =
Object.new.freeze
Instance Method Summary collapse
- #axn_name(value = NOT_SET) ⇒ Object
-
#resolved_axn_name ⇒ Object
The single canonical display name: explicit override, else Ruby's class name, else a stable fallback (replaces the old literal "Anonymous Class").
Instance Method Details
#axn_name(value = NOT_SET) ⇒ Object
30 31 32 33 34 35 36 |
# File 'lib/axn/core/naming.rb', line 30 def axn_name(value = NOT_SET) return _axn_name if value.equal?(NOT_SET) raise ArgumentError, "axn_name must be a non-blank String (got #{value.inspect})" unless value.is_a?(String) && !value.strip.empty? self._axn_name = value end |
#resolved_axn_name ⇒ Object
The single canonical display name: explicit override, else Ruby's class name, else a stable fallback (replaces the old literal "Anonymous Class").
40 41 42 |
# File 'lib/axn/core/naming.rb', line 40 def resolved_axn_name axn_name.presence || name.presence || ANONYMOUS end |