Class: Packages::Debian::ExtractMetadataService

Inherits:
Object
  • Object
show all
Includes:
Gitlab::Utils::StrongMemoize
Defined in:
app/services/packages/debian/extract_metadata_service.rb

Constant Summary collapse

ExtractionError =
Class.new(StandardError)

Instance Method Summary collapse

Methods included from Gitlab::Utils::StrongMemoize

#clear_memoization, #strong_memoize, #strong_memoized?

Constructor Details

#initialize(package_file) ⇒ ExtractMetadataService

Returns a new instance of ExtractMetadataService.


10
11
12
# File 'app/services/packages/debian/extract_metadata_service.rb', line 10

def initialize(package_file)
  @package_file = package_file
end

Instance Method Details

#executeObject

Raises:


14
15
16
17
18
# File 'app/services/packages/debian/extract_metadata_service.rb', line 14

def execute
  raise ExtractionError, 'invalid package file' unless valid_package_file?

  
end