Class: Rafflesia::DatasetSourceSnapshotProfile

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

Constant Summary collapse

HASH_ATTRS =
{
  artifacts: :artifacts,
  description: :description,
  official_docs_url: :official_docs_url,
  source: :source
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ DatasetSourceSnapshotProfile

Returns a new instance of DatasetSourceSnapshotProfile.



21
22
23
24
25
26
27
28
# File 'lib/rafflesia/datasets/dataset_source_snapshot_profile.rb', line 21

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @artifacts = (hash[:artifacts] || []).map { |item| item ? Rafflesia::DatasetSourceSnapshotArtifactProfile.new(item) : nil }
  @description = hash[:description]
  @official_docs_url = hash[:official_docs_url]
  @source = hash[:source]
end

Instance Attribute Details

#artifactsObject

Returns the value of attribute artifacts.



15
16
17
# File 'lib/rafflesia/datasets/dataset_source_snapshot_profile.rb', line 15

def artifacts
  @artifacts
end

#descriptionObject

Returns the value of attribute description.



15
16
17
# File 'lib/rafflesia/datasets/dataset_source_snapshot_profile.rb', line 15

def description
  @description
end

#official_docs_urlObject

Returns the value of attribute official_docs_url.



15
16
17
# File 'lib/rafflesia/datasets/dataset_source_snapshot_profile.rb', line 15

def official_docs_url
  @official_docs_url
end

#sourceObject

Returns the value of attribute source.



15
16
17
# File 'lib/rafflesia/datasets/dataset_source_snapshot_profile.rb', line 15

def source
  @source
end