Class: Fontisan::Commands::AuditLibraryCommand
- Inherits:
-
Object
- Object
- Fontisan::Commands::AuditLibraryCommand
- Defined in:
- lib/fontisan/commands/audit_library_command.rb
Overview
Audits every font in a directory (tree) and rolls the per-face reports up into a Models::Audit::LibrarySummary.
Thin wrapper over Audit::LibraryAuditor: validates the root path exists, delegates to the auditor, returns the summary. The auditor itself owns file discovery and per-face auditing; this command is the CLI-facing boundary that maps user-facing options onto auditor inputs.
Instance Method Summary collapse
-
#initialize(root_path, recursive:, options:) ⇒ AuditLibraryCommand
constructor
A new instance of AuditLibraryCommand.
- #run ⇒ Models::Audit::LibrarySummary
-
#skipped ⇒ Array<String>
Files skipped during the audit pass.
Constructor Details
#initialize(root_path, recursive:, options:) ⇒ AuditLibraryCommand
Returns a new instance of AuditLibraryCommand.
17 18 19 20 21 |
# File 'lib/fontisan/commands/audit_library_command.rb', line 17 def initialize(root_path, recursive:, options:) @root_path = root_path @recursive = recursive @options = end |
Instance Method Details
#run ⇒ Models::Audit::LibrarySummary
24 25 26 27 28 |
# File 'lib/fontisan/commands/audit_library_command.rb', line 24 def run raise Error, "library audit requires an existing directory: #{@root_path}" unless Dir.exist?(@root_path) auditor.audit end |
#skipped ⇒ Array<String>
Returns files skipped during the audit pass.
31 32 33 |
# File 'lib/fontisan/commands/audit_library_command.rb', line 31 def skipped auditor.skipped end |