Class: Ucode::Models::Audit::NamedInstance
- Inherits:
-
Lutaml::Model::Serializable
- Object
- Lutaml::Model::Serializable
- Ucode::Models::Audit::NamedInstance
- Defined in:
- lib/ucode/models/audit/named_instance.rb
Overview
One fvar named instance (e.g. “Bold”, “SemiCondensed”).
‘coordinates` is serialized as a compact “tag=value,tag=value” string (e.g. “wght=700,wdth=100”) for human readability. The AuditReport is primarily a human-facing artifact; downstream tooling that needs structured coordinates can re-derive them from fvar.
Class Method Summary collapse
-
.format_coordinates(axis_tags, values) ⇒ String?
Build the coordinates string from a parallel array of axis tags and fvar coordinate values.
Class Method Details
.format_coordinates(axis_tags, values) ⇒ String?
Build the coordinates string from a parallel array of axis tags and fvar coordinate values. Returns nil if either side is empty.
31 32 33 34 35 36 37 |
# File 'lib/ucode/models/audit/named_instance.rb', line 31 def self.format_coordinates(, values) return nil if .nil? || values.nil? return nil if .empty? || values.empty? pairs = .zip(values).map { |tag, val| "#{tag}=#{val}" } pairs.join(",") end |