Class: Fontist::Import::RecursiveExtraction

Inherits:
Object
  • Object
show all
Defined in:
lib/fontist/import/recursive_extraction.rb

Constant Summary collapse

LICENSE_PATTERN =
/(ofl\.txt|ufl\.txt|licenses?\.txt|license(\.md)?|copying)$/i.freeze

Instance Method Summary collapse

Constructor Details

#initialize(archive, subdir: nil, file_pattern: nil) ⇒ RecursiveExtraction

Returns a new instance of RecursiveExtraction.



11
12
13
14
15
16
17
18
19
20
# File 'lib/fontist/import/recursive_extraction.rb', line 11

def initialize(archive, subdir: nil, file_pattern: nil)
  @archive = archive
  @subdir = subdir
  @file_pattern = file_pattern
  @operations = {}
  @font_files = []
  @collection_files = []

  save_operation_subdir
end

Instance Method Details

#font_collection_filesObject



27
28
29
30
# File 'lib/fontist/import/recursive_extraction.rb', line 27

def font_collection_files
  ensure_extracted
  @collection_files
end

#font_filesObject



22
23
24
25
# File 'lib/fontist/import/recursive_extraction.rb', line 22

def font_files
  ensure_extracted
  @font_files
end

#license_textObject



32
33
34
35
# File 'lib/fontist/import/recursive_extraction.rb', line 32

def license_text
  ensure_extracted
  @license_text
end

#operationsObject



37
38
39
40
# File 'lib/fontist/import/recursive_extraction.rb', line 37

def operations
  ensure_extracted
  @operations
end