Class: Fontisan::Ufo::Compile::FeatureWriters::Base
- Inherits:
-
Object
- Object
- Fontisan::Ufo::Compile::FeatureWriters::Base
- Defined in:
- lib/fontisan/ufo/compile/feature_writers/base.rb
Overview
Abstract base class for feature writers. Concrete writers
(Kern, Gdef, Mark, etc.) extend this and implement #write.
Direct Known Subclasses
Curs, Gdef, Kern, Kern2, MarkFamilyBase
Instance Attribute Summary collapse
-
#font ⇒ Object
readonly
Returns the value of attribute font.
Instance Method Summary collapse
-
#initialize(font) ⇒ Base
constructor
A new instance of Base.
-
#write ⇒ FeatureOutput?
Structured data for the feature, or
nilif the UFO has nothing for it.
Constructor Details
#initialize(font) ⇒ Base
Returns a new instance of Base.
43 44 45 |
# File 'lib/fontisan/ufo/compile/feature_writers/base.rb', line 43 def initialize(font) @font = font end |
Instance Attribute Details
#font ⇒ Object (readonly)
Returns the value of attribute font.
40 41 42 |
# File 'lib/fontisan/ufo/compile/feature_writers/base.rb', line 40 def font @font end |
Instance Method Details
#write ⇒ FeatureOutput?
Returns structured data for the
feature, or nil if the UFO has nothing for it.
49 50 51 |
# File 'lib/fontisan/ufo/compile/feature_writers/base.rb', line 49 def write raise NotImplementedError, "#{self.class} must implement #write" end |