Class: Ucode::Models::Audit::AuditDiff
- Inherits:
-
Lutaml::Model::Serializable
- Object
- Lutaml::Model::Serializable
- Ucode::Models::Audit::AuditDiff
- Defined in:
- lib/ucode/models/audit/audit_diff.rb
Overview
Structural diff between two AuditReports.
‘left_source`/`right_source` are the original source_file paths (or report paths) so a consumer reading the diff alone can locate the inputs.
‘field_changes` lists scalar fields whose values changed. `codepoints` is the cmap delta (CodepointSetDiff). The remaining fields are array set-diffs over the report’s structural inventory: OpenType features, scripts, UCD blocks. Each is split into ‘added_*` (in right, not left) and `removed_*` (in left, not right).
ucode delta vs fontisan: drops ‘added_languages` / `removed_languages` (CLDR is out of scope).
Instance Method Summary collapse
- #added_codepoints ⇒ Object
-
#empty? ⇒ Boolean
True when nothing differs.
- #removed_codepoints ⇒ Object
Instance Method Details
#added_codepoints ⇒ Object
61 62 63 |
# File 'lib/ucode/models/audit/audit_diff.rb', line 61 def added_codepoints codepoints&.added_count || 0 end |
#empty? ⇒ Boolean
True when nothing differs. Useful for the text formatter.
51 52 53 54 55 56 57 58 59 |
# File 'lib/ucode/models/audit/audit_diff.rb', line 51 def empty? added_codepoints.zero? && removed_codepoints.zero? && all_collections_empty?( field_changes, added_features, removed_features, added_scripts, removed_scripts, added_blocks, removed_blocks ) end |
#removed_codepoints ⇒ Object
65 66 67 |
# File 'lib/ucode/models/audit/audit_diff.rb', line 65 def removed_codepoints codepoints&.removed_count || 0 end |