Class: Fontist::WindowsImportSource
- Inherits:
-
ImportSource
- Object
- Lutaml::Model::Serializable
- ImportSource
- Fontist::WindowsImportSource
- Defined in:
- lib/fontist/windows_import_source.rb
Overview
Import source for Windows Features on Demand (FOD) supplementary fonts
Tracks the capability name and minimum Windows version for fonts installed via Add-WindowsCapability.
Instance Method Summary collapse
-
#==(other) ⇒ Boolean
(also: #eql?)
Equality check based on capability name.
-
#differentiation_key ⇒ String?
Returns the capability name for differentiation.
-
#outdated?(new_source) ⇒ Boolean
Checks if this import source is older than the provided new source.
-
#to_s ⇒ String
Returns a human-readable string representation.
Instance Method Details
#==(other) ⇒ Boolean Also known as: eql?
Equality check based on capability name
46 47 48 49 50 |
# File 'lib/fontist/windows_import_source.rb', line 46 def ==(other) return false unless other.is_a?(WindowsImportSource) capability_name == other.capability_name end |
#differentiation_key ⇒ String?
Returns the capability name for differentiation
18 19 20 |
# File 'lib/fontist/windows_import_source.rb', line 18 def differentiation_key capability_name end |
#outdated?(new_source) ⇒ Boolean
Checks if this import source is older than the provided new source
26 27 28 29 30 31 32 |
# File 'lib/fontist/windows_import_source.rb', line 26 def outdated?(new_source) return false unless new_source.is_a?(WindowsImportSource) # Windows FOD capabilities don't have versioned updates in the same way; # they are either present or not. Always return false. false end |
#to_s ⇒ String
Returns a human-readable string representation
37 38 39 40 |
# File 'lib/fontist/windows_import_source.rb', line 37 def to_s "Windows FOD (capability: #{capability_name}, " \ "min_version: #{min_windows_version})" end |