Module: Fontisan::Audit::Registry
- Defined in:
- lib/fontisan/audit/registry.rb
Overview
Ordered list of extractor classes run for every audit face.
Order matters only for human-readable output (text formatter). All extractors are independent; their outputs are merged into one big hash before constructing the AuditReport.
Add new extractors here. AuditCommand never enumerates them directly (OCP: adding a concern = one line here + one file).
Constant Summary collapse
- ORDERED_EXTRACTORS =
Full audit: every concern.
[ Extractors::Provenance, Extractors::Identity, Extractors::Style, Extractors::Licensing, Extractors::Metrics, Extractors::Hinting, Extractors::ColorCapabilities, Extractors::VariationDetail, Extractors::OpenTypeLayout, Extractors::Coverage, Extractors::Aggregations, Extractors::LanguageCoverage, ].freeze
- BRIEF_EXTRACTORS =
Brief audit: only the cheap, name-table-only extractors. Skips metrics/hinting/color/variation/layout (extra table loads) and aggregations/language coverage (need UCD/CLDR indices). Used by
fontisan audit --brieffor a fast inventory pass. [ Extractors::Provenance, Extractors::Identity, Extractors::Style, Extractors::Licensing, Extractors::Coverage, ].freeze
Class Method Summary collapse
-
.each(mode: :full) {|extractor_class| ... } ⇒ Object
Iterate the extractors appropriate for the given mode.
-
.extractors_for(mode) ⇒ Array<Class>
The extractor list for the given mode.
Class Method Details
.each(mode: :full) {|extractor_class| ... } ⇒ Object
Iterate the extractors appropriate for the given mode.
46 47 48 |
# File 'lib/fontisan/audit/registry.rb', line 46 def self.each(mode: :full, &) extractors_for(mode).each(&) end |
.extractors_for(mode) ⇒ Array<Class>
Returns the extractor list for the given mode.
52 53 54 55 56 57 |
# File 'lib/fontisan/audit/registry.rb', line 52 def self.extractors_for(mode) case mode when :brief then BRIEF_EXTRACTORS else ORDERED_EXTRACTORS end end |