Class: Ucode::Commands::Audit::CollectionCommand
- Inherits:
-
Object
- Object
- Ucode::Commands::Audit::CollectionCommand
- Defined in:
- lib/ucode/commands/audit/collection_command.rb
Overview
ucode audit collection PATH — explicit collection audit.
Wraps FontCommand with two collection-specific behaviors:
- Validates the source is actually a collection
(TTC/OTC/dfong). Errors out otherwise.
- Supports `font_index:` to audit only one face of the
collection, producing a single-face tree.
For unspecified collection options, delegates to FontCommand.
Instance Method Summary collapse
-
#call(font_path, font_index: nil, **kwargs) ⇒ FontCommand::Result
When auditing all faces, or a single-face variant when
font_index:is set.
Instance Method Details
#call(font_path, font_index: nil, **kwargs) ⇒ FontCommand::Result
Returns when auditing all faces, or a
single-face variant when font_index: is set.
28 29 30 31 32 33 |
# File 'lib/ucode/commands/audit/collection_command.rb', line 28 def call(font_path, font_index: nil, **kwargs) raise CollectionRequiredError, font_path unless collection?(font_path) return audit_single_face(font_path, font_index, kwargs) if font_index font_command.call(font_path, **kwargs) end |