Class: Fontist::ImportSource Abstract
- Inherits:
-
Lutaml::Model::Serializable
- Object
- Lutaml::Model::Serializable
- Fontist::ImportSource
- Defined in:
- lib/fontist/import_source.rb
Overview
Base class for import sources. Use subclasses like MacosImportSource, GoogleImportSource, or SilImportSource instead.
Base class for import source metadata
This provides a polymorphic way to track where and how fonts were imported from. Each subclass handles source-specific metadata while maintaining a consistent interface.
Direct Known Subclasses
GoogleImportSource, MacosImportSource, SilImportSource, WindowsImportSource
Instance Method Summary collapse
-
#differentiation_key ⇒ String
abstract
Returns a key that can be used to differentiate this source from others.
-
#outdated?(new_source) ⇒ Boolean
abstract
Checks if this source is older than the provided new source.
-
#to_s ⇒ String
abstract
String representation of the import source.
Instance Method Details
#differentiation_key ⇒ String
Subclasses must implement this
Returns a key that can be used to differentiate this source from others
26 27 28 29 |
# File 'lib/fontist/import_source.rb', line 26 def differentiation_key raise NotImplementedError, "#{self.class} must implement #differentiation_key" end |
#outdated?(new_source) ⇒ Boolean
Subclasses must implement this
Checks if this source is older than the provided new source
35 36 37 |
# File 'lib/fontist/import_source.rb', line 35 def outdated?(new_source) raise NotImplementedError, "#{self.class} must implement #outdated?" end |
#to_s ⇒ String
Subclasses should implement this for debugging/logging
String representation of the import source
42 43 44 |
# File 'lib/fontist/import_source.rb', line 42 def to_s "#{self.class.name} (type: #{type})" end |