Class: Rafflesia::CorpuReleaseShowData
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::CorpuReleaseShowData
- Defined in:
- lib/rafflesia/datasets/corpu_release_show_data.rb
Constant Summary collapse
- HASH_ATTRS =
{ backend: :backend, evidence_channel_count: :evidence_channel_count, evidence_channels: :evidence_channels, manifest: :manifest, object_store_root: :object_store_root, release: :release, runtime_contract: :runtime_contract }.freeze
Instance Attribute Summary collapse
-
#backend ⇒ Object
Returns the value of attribute backend.
-
#evidence_channel_count ⇒ Object
Returns the value of attribute evidence_channel_count.
-
#evidence_channels ⇒ Object
Returns the value of attribute evidence_channels.
-
#manifest ⇒ Object
Returns the value of attribute manifest.
-
#object_store_root ⇒ Object
Returns the value of attribute object_store_root.
-
#release ⇒ Object
Returns the value of attribute release.
-
#runtime_contract ⇒ Object
Returns the value of attribute runtime_contract.
Instance Method Summary collapse
-
#initialize(json) ⇒ CorpuReleaseShowData
constructor
A new instance of CorpuReleaseShowData.
Constructor Details
#initialize(json) ⇒ CorpuReleaseShowData
Returns a new instance of CorpuReleaseShowData.
27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/rafflesia/datasets/corpu_release_show_data.rb', line 27 def initialize(json) super() hash = self.class.normalize(json) @backend = hash[:backend] @evidence_channel_count = hash[:evidence_channel_count] @evidence_channels = (hash[:evidence_channels] || []).map { |item| item ? Rafflesia::CorpuReleaseEvidenceChannel.new(item) : nil } @manifest = hash[:manifest] || {} @object_store_root = hash[:object_store_root] @release = hash[:release] ? Rafflesia::CorpuReleaseRecord.new(hash[:release]) : nil @runtime_contract = hash[:runtime_contract] ? Rafflesia::CorpuReleaseRuntimeContract.new(hash[:runtime_contract]) : nil end |
Instance Attribute Details
#backend ⇒ Object
Returns the value of attribute backend.
18 19 20 |
# File 'lib/rafflesia/datasets/corpu_release_show_data.rb', line 18 def backend @backend end |
#evidence_channel_count ⇒ Object
Returns the value of attribute evidence_channel_count.
18 19 20 |
# File 'lib/rafflesia/datasets/corpu_release_show_data.rb', line 18 def evidence_channel_count @evidence_channel_count end |
#evidence_channels ⇒ Object
Returns the value of attribute evidence_channels.
18 19 20 |
# File 'lib/rafflesia/datasets/corpu_release_show_data.rb', line 18 def evidence_channels @evidence_channels end |
#manifest ⇒ Object
Returns the value of attribute manifest.
18 19 20 |
# File 'lib/rafflesia/datasets/corpu_release_show_data.rb', line 18 def manifest @manifest end |
#object_store_root ⇒ Object
Returns the value of attribute object_store_root.
18 19 20 |
# File 'lib/rafflesia/datasets/corpu_release_show_data.rb', line 18 def object_store_root @object_store_root end |
#release ⇒ Object
Returns the value of attribute release.
18 19 20 |
# File 'lib/rafflesia/datasets/corpu_release_show_data.rb', line 18 def release @release end |
#runtime_contract ⇒ Object
Returns the value of attribute runtime_contract.
18 19 20 |
# File 'lib/rafflesia/datasets/corpu_release_show_data.rb', line 18 def runtime_contract @runtime_contract end |