Class: Cabriolet::Extraction::BaseExtractor

Inherits:
Object
  • Object
show all
Defined in:
lib/cabriolet/extraction/base_extractor.rb

Overview

BaseExtractor provides common extraction functionality for all extractors Reduces code duplication between SimpleExtractor and Parallel::Extractor

Instance Method Summary collapse

Constructor Details

#initialize(output_dir, preserve_paths: true, overwrite: false) ⇒ BaseExtractor

Initialize the base extractor

Parameters:

  • output_dir (String)

    Directory to extract files to

  • preserve_paths (Boolean) (defaults to: true)

    Whether to preserve directory structure

  • overwrite (Boolean) (defaults to: false)

    Whether to overwrite existing files



15
16
17
18
19
# File 'lib/cabriolet/extraction/base_extractor.rb', line 15

def initialize(output_dir, preserve_paths: true, overwrite: false)
  @output_dir = output_dir
  @preserve_paths = preserve_paths
  @overwrite = overwrite
end