Class: Gitlab::ImportExport::JSON::LegacyReader::Hash

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

Instance Method Summary collapse

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

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

Constructor Details

#initialize(tree_hash, relation_names:, allowed_path: nil) ⇒ Hash

Returns a new instance of Hash.


38
39
40
41
42
43
# File 'lib/gitlab/import_export/json/legacy_reader.rb', line 38

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

Instance Method Details

#exist?Boolean

Returns:

  • (Boolean)

45
46
47
# File 'lib/gitlab/import_export/json/legacy_reader.rb', line 45

def exist?
  @tree_hash.present?
end