Class: Rafflesia::StructurePredictionEntity
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::StructurePredictionEntity
- Defined in:
- lib/rafflesia/foundry/structure_prediction_entity.rb
Constant Summary collapse
- HASH_ATTRS =
{ ccd: :ccd, id: :id, modifications: :modifications, sequence: :sequence, smiles: :smiles, type: :type }.freeze
Instance Attribute Summary collapse
-
#ccd ⇒ Object
Returns the value of attribute ccd.
-
#id ⇒ Object
Returns the value of attribute id.
-
#modifications ⇒ Object
Returns the value of attribute modifications.
-
#sequence ⇒ Object
Returns the value of attribute sequence.
-
#smiles ⇒ Object
Returns the value of attribute smiles.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(json) ⇒ StructurePredictionEntity
constructor
A new instance of StructurePredictionEntity.
Constructor Details
#initialize(json) ⇒ StructurePredictionEntity
Returns a new instance of StructurePredictionEntity.
25 26 27 28 29 30 31 32 33 34 |
# File 'lib/rafflesia/foundry/structure_prediction_entity.rb', line 25 def initialize(json) super() hash = self.class.normalize(json) @ccd = (hash[:ccd] || []) @id = hash[:id] @modifications = (hash[:modifications] || []).map { |item| item ? Rafflesia::StructurePredictionModification.new(item) : nil } @sequence = hash[:sequence] @smiles = hash[:smiles] @type = hash[:type] end |
Instance Attribute Details
#ccd ⇒ Object
Returns the value of attribute ccd.
17 18 19 |
# File 'lib/rafflesia/foundry/structure_prediction_entity.rb', line 17 def ccd @ccd end |
#id ⇒ Object
Returns the value of attribute id.
17 18 19 |
# File 'lib/rafflesia/foundry/structure_prediction_entity.rb', line 17 def id @id end |
#modifications ⇒ Object
Returns the value of attribute modifications.
17 18 19 |
# File 'lib/rafflesia/foundry/structure_prediction_entity.rb', line 17 def modifications @modifications end |
#sequence ⇒ Object
Returns the value of attribute sequence.
17 18 19 |
# File 'lib/rafflesia/foundry/structure_prediction_entity.rb', line 17 def sequence @sequence end |
#smiles ⇒ Object
Returns the value of attribute smiles.
17 18 19 |
# File 'lib/rafflesia/foundry/structure_prediction_entity.rb', line 17 def smiles @smiles end |
#type ⇒ Object
Returns the value of attribute type.
17 18 19 |
# File 'lib/rafflesia/foundry/structure_prediction_entity.rb', line 17 def type @type end |