Class: Rafflesia::DatasetSourceSnapshotProfile
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::DatasetSourceSnapshotProfile
- 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
-
#artifacts ⇒ Object
Returns the value of attribute artifacts.
-
#description ⇒ Object
Returns the value of attribute description.
-
#official_docs_url ⇒ Object
Returns the value of attribute official_docs_url.
-
#source ⇒ Object
Returns the value of attribute source.
Instance Method Summary collapse
-
#initialize(json) ⇒ DatasetSourceSnapshotProfile
constructor
A new instance of DatasetSourceSnapshotProfile.
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
#artifacts ⇒ Object
Returns the value of attribute artifacts.
15 16 17 |
# File 'lib/rafflesia/datasets/dataset_source_snapshot_profile.rb', line 15 def artifacts @artifacts end |
#description ⇒ Object
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_url ⇒ Object
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 |
#source ⇒ Object
Returns the value of attribute source.
15 16 17 |
# File 'lib/rafflesia/datasets/dataset_source_snapshot_profile.rb', line 15 def source @source end |