Class: Rafflesia::CorpuReleaseRuntimeContract
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::CorpuReleaseRuntimeContract
- Defined in:
- lib/rafflesia/datasets/corpu_release_runtime_contract.rb
Constant Summary collapse
- HASH_ATTRS =
{ cost_observation_count: :cost_observation_count, cost_observations: :cost_observations, evidence_channel_count: :evidence_channel_count, evidence_channels: :evidence_channels, release_ref: :release_ref, schema: :schema }.freeze
Instance Attribute Summary collapse
-
#cost_observation_count ⇒ Object
Returns the value of attribute cost_observation_count.
-
#cost_observations ⇒ Object
Returns the value of attribute cost_observations.
-
#evidence_channel_count ⇒ Object
Returns the value of attribute evidence_channel_count.
-
#evidence_channels ⇒ Object
Returns the value of attribute evidence_channels.
-
#release_ref ⇒ Object
Returns the value of attribute release_ref.
-
#schema ⇒ Object
Returns the value of attribute schema.
Instance Method Summary collapse
-
#initialize(json) ⇒ CorpuReleaseRuntimeContract
constructor
A new instance of CorpuReleaseRuntimeContract.
Constructor Details
#initialize(json) ⇒ CorpuReleaseRuntimeContract
Returns a new instance of CorpuReleaseRuntimeContract.
25 26 27 28 29 30 31 32 33 34 |
# File 'lib/rafflesia/datasets/corpu_release_runtime_contract.rb', line 25 def initialize(json) super() hash = self.class.normalize(json) @cost_observation_count = hash[:cost_observation_count] @cost_observations = (hash[:cost_observations] || []).map { |item| item ? Rafflesia::CorpuReleaseCostObservation.new(item) : nil } @evidence_channel_count = hash[:evidence_channel_count] @evidence_channels = (hash[:evidence_channels] || []).map { |item| item ? Rafflesia::CorpuReleaseEvidenceChannel.new(item) : nil } @release_ref = hash[:release_ref] @schema = hash[:schema] end |
Instance Attribute Details
#cost_observation_count ⇒ Object
Returns the value of attribute cost_observation_count.
17 18 19 |
# File 'lib/rafflesia/datasets/corpu_release_runtime_contract.rb', line 17 def cost_observation_count @cost_observation_count end |
#cost_observations ⇒ Object
Returns the value of attribute cost_observations.
17 18 19 |
# File 'lib/rafflesia/datasets/corpu_release_runtime_contract.rb', line 17 def cost_observations @cost_observations end |
#evidence_channel_count ⇒ Object
Returns the value of attribute evidence_channel_count.
17 18 19 |
# File 'lib/rafflesia/datasets/corpu_release_runtime_contract.rb', line 17 def evidence_channel_count @evidence_channel_count end |
#evidence_channels ⇒ Object
Returns the value of attribute evidence_channels.
17 18 19 |
# File 'lib/rafflesia/datasets/corpu_release_runtime_contract.rb', line 17 def evidence_channels @evidence_channels end |
#release_ref ⇒ Object
Returns the value of attribute release_ref.
17 18 19 |
# File 'lib/rafflesia/datasets/corpu_release_runtime_contract.rb', line 17 def release_ref @release_ref end |
#schema ⇒ Object
Returns the value of attribute schema.
17 18 19 |
# File 'lib/rafflesia/datasets/corpu_release_runtime_contract.rb', line 17 def schema @schema end |