Class: Rafflesia::DatasetManifestScanData

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/datasets/dataset_manifest_scan_data.rb

Constant Summary collapse

HASH_ATTRS =
{
  manifests: :manifests,
  matched_count: :matched_count,
  returned_count: :returned_count,
  root: :root,
  scanned_count: :scanned_count,
  schema_version: :schema_version,
  skipped_count: :skipped_count
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ DatasetManifestScanData

Returns a new instance of DatasetManifestScanData.



27
28
29
30
31
32
33
34
35
36
37
# File 'lib/rafflesia/datasets/dataset_manifest_scan_data.rb', line 27

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @manifests = (hash[:manifests] || []).map { |item| item ? Rafflesia::DatasetManifestScanEntry.new(item) : nil }
  @matched_count = hash[:matched_count]
  @returned_count = hash[:returned_count]
  @root = hash[:root]
  @scanned_count = hash[:scanned_count]
  @schema_version = hash[:schema_version]
  @skipped_count = hash[:skipped_count]
end

Instance Attribute Details

#manifestsObject

Returns the value of attribute manifests.



18
19
20
# File 'lib/rafflesia/datasets/dataset_manifest_scan_data.rb', line 18

def manifests
  @manifests
end

#matched_countObject

Returns the value of attribute matched_count.



18
19
20
# File 'lib/rafflesia/datasets/dataset_manifest_scan_data.rb', line 18

def matched_count
  @matched_count
end

#returned_countObject

Returns the value of attribute returned_count.



18
19
20
# File 'lib/rafflesia/datasets/dataset_manifest_scan_data.rb', line 18

def returned_count
  @returned_count
end

#rootObject

Returns the value of attribute root.



18
19
20
# File 'lib/rafflesia/datasets/dataset_manifest_scan_data.rb', line 18

def root
  @root
end

#scanned_countObject

Returns the value of attribute scanned_count.



18
19
20
# File 'lib/rafflesia/datasets/dataset_manifest_scan_data.rb', line 18

def scanned_count
  @scanned_count
end

#schema_versionObject

Returns the value of attribute schema_version.



18
19
20
# File 'lib/rafflesia/datasets/dataset_manifest_scan_data.rb', line 18

def schema_version
  @schema_version
end

#skipped_countObject

Returns the value of attribute skipped_count.



18
19
20
# File 'lib/rafflesia/datasets/dataset_manifest_scan_data.rb', line 18

def skipped_count
  @skipped_count
end