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
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
25 26 27 28 |
# File 'lib/fontist/import_source.rb', line 25 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
34 35 36 |
# File 'lib/fontist/import_source.rb', line 34 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
41 42 43 |
# File 'lib/fontist/import_source.rb', line 41 def to_s "#{self.class.name} (type: #{type})" end |