Exception: Fontisan::Ufo::GlyphExistsError
- Inherits:
-
StandardError
- Object
- StandardError
- Fontisan::Ufo::GlyphExistsError
- Defined in:
- lib/fontisan/ufo/glyph_exists_error.rb
Overview
Raised by Layer#add when a glyph with the same name is already
present. Surfaces what would otherwise be a silent overwrite so
the caller can decide between Layer#put (intentional replace)
and Stitcher::UniqueGlyphName.in (auto-rename).
Extracted as a sibling of Layer (rather than nested inside it)
so the namespace stays flat and the error can be referenced
without pulling in the full Layer implementation.
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name) ⇒ GlyphExistsError
constructor
A new instance of GlyphExistsError.
Constructor Details
#initialize(name) ⇒ GlyphExistsError
Returns a new instance of GlyphExistsError.
16 17 18 19 20 |
# File 'lib/fontisan/ufo/glyph_exists_error.rb', line 16 def initialize(name) @name = name super("a glyph named #{name.inspect} already exists; use #put " \ "to overwrite or UniqueGlyphName.in to deconflict") end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
14 15 16 |
# File 'lib/fontisan/ufo/glyph_exists_error.rb', line 14 def name @name end |