Class: Rafflesia::DatasetSourceSnapshotValidateData

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

Constant Summary collapse

HASH_ATTRS =
{
  gates: :gates,
  ok: :ok,
  record_count: :record_count,
  ref: :ref,
  relation: :relation,
  source: :source,
  version: :version
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ DatasetSourceSnapshotValidateData

Returns a new instance of DatasetSourceSnapshotValidateData.



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

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @gates = (hash[:gates] || []).map { |item| item ? Rafflesia::DatasetSourceSnapshotGate.new(item) : nil }
  @ok = hash[:ok]
  @record_count = hash[:record_count]
  @ref = hash[:ref]
  @relation = hash[:relation]
  @source = hash[:source]
  @version = hash[:version]
end

Instance Attribute Details

#gatesObject

Returns the value of attribute gates.



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

def gates
  @gates
end

#okObject

Returns the value of attribute ok.



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

def ok
  @ok
end

#record_countObject

Returns the value of attribute record_count.



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

def record_count
  @record_count
end

#refObject

Returns the value of attribute ref.



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

def ref
  @ref
end

#relationObject

Returns the value of attribute relation.



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

def relation
  @relation
end

#sourceObject

Returns the value of attribute source.



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

def source
  @source
end

#versionObject

Returns the value of attribute version.



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

def version
  @version
end