Class: Rafflesia::CorpuReleaseRuntimeContract

Inherits:
Types::BaseModel
  • Object
show all
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

Instance Method Summary collapse

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_countObject

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_observationsObject

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_countObject

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_channelsObject

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_refObject

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

#schemaObject

Returns the value of attribute schema.



17
18
19
# File 'lib/rafflesia/datasets/corpu_release_runtime_contract.rb', line 17

def schema
  @schema
end