Class: Rafflesia::ObjectArtifactContractData
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::ObjectArtifactContractData
- Defined in:
- lib/rafflesia/object_artifacts/object_artifact_contract_data.rb
Constant Summary collapse
- HASH_ATTRS =
{ acceptance_gates: :acceptance_gates, adapter_contracts: :adapter_contracts, cache_semantics: :cache_semantics, manifest_schema: :manifest_schema, schema_version: :schema_version }.freeze
Instance Attribute Summary collapse
-
#acceptance_gates ⇒ Object
Returns the value of attribute acceptance_gates.
-
#adapter_contracts ⇒ Object
Returns the value of attribute adapter_contracts.
-
#cache_semantics ⇒ Object
Returns the value of attribute cache_semantics.
-
#manifest_schema ⇒ Object
Returns the value of attribute manifest_schema.
-
#schema_version ⇒ Object
Returns the value of attribute schema_version.
Instance Method Summary collapse
-
#initialize(json) ⇒ ObjectArtifactContractData
constructor
A new instance of ObjectArtifactContractData.
Constructor Details
#initialize(json) ⇒ ObjectArtifactContractData
Returns a new instance of ObjectArtifactContractData.
23 24 25 26 27 28 29 30 31 |
# File 'lib/rafflesia/object_artifacts/object_artifact_contract_data.rb', line 23 def initialize(json) super() hash = self.class.normalize(json) @acceptance_gates = (hash[:acceptance_gates] || []).map { |item| item ? Rafflesia::ObjectArtifactAcceptanceGate.new(item) : nil } @adapter_contracts = (hash[:adapter_contracts] || []).map { |item| item ? Rafflesia::ObjectArtifactAdapterContract.new(item) : nil } @cache_semantics = hash[:cache_semantics] ? Rafflesia::ObjectArtifactCacheContract.new(hash[:cache_semantics]) : nil @manifest_schema = hash[:manifest_schema] ? Rafflesia::ObjectArtifactManifestContract.new(hash[:manifest_schema]) : nil @schema_version = hash[:schema_version] end |
Instance Attribute Details
#acceptance_gates ⇒ Object
Returns the value of attribute acceptance_gates.
16 17 18 |
# File 'lib/rafflesia/object_artifacts/object_artifact_contract_data.rb', line 16 def acceptance_gates @acceptance_gates end |
#adapter_contracts ⇒ Object
Returns the value of attribute adapter_contracts.
16 17 18 |
# File 'lib/rafflesia/object_artifacts/object_artifact_contract_data.rb', line 16 def adapter_contracts @adapter_contracts end |
#cache_semantics ⇒ Object
Returns the value of attribute cache_semantics.
16 17 18 |
# File 'lib/rafflesia/object_artifacts/object_artifact_contract_data.rb', line 16 def cache_semantics @cache_semantics end |
#manifest_schema ⇒ Object
Returns the value of attribute manifest_schema.
16 17 18 |
# File 'lib/rafflesia/object_artifacts/object_artifact_contract_data.rb', line 16 def manifest_schema @manifest_schema end |
#schema_version ⇒ Object
Returns the value of attribute schema_version.
16 17 18 |
# File 'lib/rafflesia/object_artifacts/object_artifact_contract_data.rb', line 16 def schema_version @schema_version end |