class Fontist::Import::Files::CollectionFile
Attributes
Public Class Methods
Source
# File lib/fontist/import/files/collection_file.rb, line 9 def from_path(path, name_prefix: nil, error_collector: nil) collection = build_collection(path, error_collector: error_collector) return nil unless collection new(collection, path, name_prefix) rescue StandardError => e # rubocop:disable Layout/LineLength Fontist.ui.debug("Failed to build collection from #{File.basename(path)}: #{e.message}") # rubocop:enable Layout/LineLength nil end
Source
# File lib/fontist/import/files/collection_file.rb, line 40 def initialize(fontisan_collection, path, name_prefix = nil) @collection = fontisan_collection @path = path @name_prefix = name_prefix @fonts = extract_fonts end
Public Instance Methods
Source
# File lib/fontist/import/files/collection_file.rb, line 47 def filename # rubocop:disable Layout/LineLength # Use the exact filename from the archive - do NOT modify or standardize it # rubocop:enable Layout/LineLength File.basename(@path) end
Source
# File lib/fontist/import/files/collection_file.rb, line 54 def source_filename # source_filename is only used when filename != original filename # Since we now use exact filename, this should always be nil nil end