Class: Rafflesia::ArchiveAssociationCandidate
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::ArchiveAssociationCandidate
- Defined in:
- lib/rafflesia/artifacts/archive_association_candidate.rb
Constant Summary collapse
- HASH_ATTRS =
{ group_key: :group_key, map_count: :map_count, maps: :maps, method: :method, status: :status, structure_count: :structure_count, structures: :structures }.freeze
Instance Attribute Summary collapse
-
#group_key ⇒ Object
Returns the value of attribute group_key.
-
#map_count ⇒ Object
Returns the value of attribute map_count.
-
#maps ⇒ Object
Returns the value of attribute maps.
-
#method ⇒ Object
Returns the value of attribute method.
-
#status ⇒ Object
Returns the value of attribute status.
-
#structure_count ⇒ Object
Returns the value of attribute structure_count.
-
#structures ⇒ Object
Returns the value of attribute structures.
Instance Method Summary collapse
-
#initialize(json) ⇒ ArchiveAssociationCandidate
constructor
A new instance of ArchiveAssociationCandidate.
Constructor Details
#initialize(json) ⇒ ArchiveAssociationCandidate
Returns a new instance of ArchiveAssociationCandidate.
27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/rafflesia/artifacts/archive_association_candidate.rb', line 27 def initialize(json) super() hash = self.class.normalize(json) @group_key = hash[:group_key] @map_count = hash[:map_count] @maps = (hash[:maps] || []).map { |item| item ? Rafflesia::ArchiveAssociationArtifactRef.new(item) : nil } @method = hash[:method] @status = hash[:status] @structure_count = hash[:structure_count] @structures = (hash[:structures] || []).map { |item| item ? Rafflesia::ArchiveAssociationArtifactRef.new(item) : nil } end |
Instance Attribute Details
#group_key ⇒ Object
Returns the value of attribute group_key.
18 19 20 |
# File 'lib/rafflesia/artifacts/archive_association_candidate.rb', line 18 def group_key @group_key end |
#map_count ⇒ Object
Returns the value of attribute map_count.
18 19 20 |
# File 'lib/rafflesia/artifacts/archive_association_candidate.rb', line 18 def map_count @map_count end |
#maps ⇒ Object
Returns the value of attribute maps.
18 19 20 |
# File 'lib/rafflesia/artifacts/archive_association_candidate.rb', line 18 def maps @maps end |
#method ⇒ Object
Returns the value of attribute method.
18 19 20 |
# File 'lib/rafflesia/artifacts/archive_association_candidate.rb', line 18 def method @method end |
#status ⇒ Object
Returns the value of attribute status.
18 19 20 |
# File 'lib/rafflesia/artifacts/archive_association_candidate.rb', line 18 def status @status end |
#structure_count ⇒ Object
Returns the value of attribute structure_count.
18 19 20 |
# File 'lib/rafflesia/artifacts/archive_association_candidate.rb', line 18 def structure_count @structure_count end |
#structures ⇒ Object
Returns the value of attribute structures.
18 19 20 |
# File 'lib/rafflesia/artifacts/archive_association_candidate.rb', line 18 def structures @structures end |