Class: Gitlab::ImportExport::JSON::LegacyReader::File

Inherits:
Gitlab::ImportExport::JSON::LegacyReader show all
Includes:
Utils::StrongMemoize
Defined in:
lib/gitlab/import_export/json/legacy_reader.rb

Instance Method Summary collapse

Methods included from Utils::StrongMemoize

#clear_memoization, #strong_memoize, #strong_memoized?

Methods inherited from Gitlab::ImportExport::JSON::LegacyReader

#consume_attributes, #consume_relation, #legacy?, #sort_ci_pipelines_by_id

Constructor Details

#initialize(path, relation_names:, allowed_path: nil) ⇒ File

Returns a new instance of File.


10
11
12
13
14
15
# File 'lib/gitlab/import_export/json/legacy_reader.rb', line 10

def initialize(path, relation_names:, allowed_path: nil)
  @path = path
  super(
    relation_names: relation_names,
    allowed_path: allowed_path)
end

Instance Method Details

#exist?Boolean

Returns:

  • (Boolean)

17
18
19
# File 'lib/gitlab/import_export/json/legacy_reader.rb', line 17

def exist?
  ::File.exist?(@path)
end