Class: Rafflesia::MapModelEvidenceData
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::MapModelEvidenceData
- Defined in:
- lib/rafflesia/maps/map_model_evidence_data.rb
Constant Summary collapse
- HASH_ATTRS =
{ entries: :entries, entry_count: :entry_count, relation: :relation, schema_version: :schema_version }.freeze
Instance Attribute Summary collapse
-
#entries ⇒ Object
Returns the value of attribute entries.
-
#entry_count ⇒ Object
Returns the value of attribute entry_count.
-
#relation ⇒ Object
Returns the value of attribute relation.
-
#schema_version ⇒ Object
Returns the value of attribute schema_version.
Instance Method Summary collapse
-
#initialize(json) ⇒ MapModelEvidenceData
constructor
A new instance of MapModelEvidenceData.
Constructor Details
#initialize(json) ⇒ MapModelEvidenceData
Returns a new instance of MapModelEvidenceData.
21 22 23 24 25 26 27 28 |
# File 'lib/rafflesia/maps/map_model_evidence_data.rb', line 21 def initialize(json) super() hash = self.class.normalize(json) @entries = (hash[:entries] || []).map { |item| item ? Rafflesia::MapModelEvidenceEntry.new(item) : nil } @entry_count = hash[:entry_count] @relation = hash[:relation] ? Rafflesia::RelationArtifactData.new(hash[:relation]) : nil @schema_version = hash[:schema_version] end |
Instance Attribute Details
#entries ⇒ Object
Returns the value of attribute entries.
15 16 17 |
# File 'lib/rafflesia/maps/map_model_evidence_data.rb', line 15 def entries @entries end |
#entry_count ⇒ Object
Returns the value of attribute entry_count.
15 16 17 |
# File 'lib/rafflesia/maps/map_model_evidence_data.rb', line 15 def entry_count @entry_count end |
#relation ⇒ Object
Returns the value of attribute relation.
15 16 17 |
# File 'lib/rafflesia/maps/map_model_evidence_data.rb', line 15 def relation @relation end |
#schema_version ⇒ Object
Returns the value of attribute schema_version.
15 16 17 |
# File 'lib/rafflesia/maps/map_model_evidence_data.rb', line 15 def schema_version @schema_version end |