Class: Fontisan::Models::Audit::AuditDiff
- Inherits:
-
Lutaml::Model::Serializable
- Object
- Lutaml::Model::Serializable
- Fontisan::Models::Audit::AuditDiff
- Defined in:
- lib/fontisan/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, and
CLDR languages. Each is split into added_* (in right, not left)
and removed_* (in left, not right).
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/fontisan/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.
52 53 54 55 56 57 58 59 |
# File 'lib/fontisan/models/audit/audit_diff.rb', line 52 def empty? collection_empty?(field_changes) && added_codepoints.zero? && removed_codepoints.zero? && collection_empty?(added_features) && collection_empty?(removed_features) && collection_empty?(added_scripts) && collection_empty?(removed_scripts) && collection_empty?(added_blocks) && collection_empty?(removed_blocks) && collection_empty?(added_languages) && collection_empty?(removed_languages) end |
#removed_codepoints ⇒ Object
65 66 67 |
# File 'lib/fontisan/models/audit/audit_diff.rb', line 65 def removed_codepoints codepoints&.removed_count || 0 end |