Class: Rafflesia::PocketDetectData
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::PocketDetectData
- Defined in:
- lib/rafflesia/proteins/pocket_detect_data.rb
Constant Summary collapse
- HASH_ATTRS =
{ backend: :backend, cache_hit: :cache_hit, cache_key: :cache_key, cache_mode: :cache_mode, objects: :objects, pockets: :pockets, relation: :relation, structure_id: :structure_id }.freeze
Instance Attribute Summary collapse
-
#backend ⇒ Object
Returns the value of attribute backend.
-
#cache_hit ⇒ Object
Returns the value of attribute cache_hit.
-
#cache_key ⇒ Object
Returns the value of attribute cache_key.
-
#cache_mode ⇒ Object
Returns the value of attribute cache_mode.
-
#objects ⇒ Object
Returns the value of attribute objects.
-
#pockets ⇒ Object
Returns the value of attribute pockets.
-
#relation ⇒ Object
Returns the value of attribute relation.
-
#structure_id ⇒ Object
Returns the value of attribute structure_id.
Instance Method Summary collapse
-
#initialize(json) ⇒ PocketDetectData
constructor
A new instance of PocketDetectData.
Constructor Details
#initialize(json) ⇒ PocketDetectData
Returns a new instance of PocketDetectData.
29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/rafflesia/proteins/pocket_detect_data.rb', line 29 def initialize(json) super() hash = self.class.normalize(json) @backend = hash[:backend] @cache_hit = hash[:cache_hit] @cache_key = hash[:cache_key] @cache_mode = hash[:cache_mode] @objects = (hash[:objects] || []).map { |item| item ? Rafflesia::ObjectRef.new(item) : nil } @pockets = (hash[:pockets] || []).map { |item| item ? Rafflesia::Pocket.new(item) : nil } @relation = hash[:relation] ? Rafflesia::RelationArtifactData.new(hash[:relation]) : nil @structure_id = hash[:structure_id] end |
Instance Attribute Details
#backend ⇒ Object
Returns the value of attribute backend.
19 20 21 |
# File 'lib/rafflesia/proteins/pocket_detect_data.rb', line 19 def backend @backend end |
#cache_hit ⇒ Object
Returns the value of attribute cache_hit.
19 20 21 |
# File 'lib/rafflesia/proteins/pocket_detect_data.rb', line 19 def cache_hit @cache_hit end |
#cache_key ⇒ Object
Returns the value of attribute cache_key.
19 20 21 |
# File 'lib/rafflesia/proteins/pocket_detect_data.rb', line 19 def cache_key @cache_key end |
#cache_mode ⇒ Object
Returns the value of attribute cache_mode.
19 20 21 |
# File 'lib/rafflesia/proteins/pocket_detect_data.rb', line 19 def cache_mode @cache_mode end |
#objects ⇒ Object
Returns the value of attribute objects.
19 20 21 |
# File 'lib/rafflesia/proteins/pocket_detect_data.rb', line 19 def objects @objects end |
#pockets ⇒ Object
Returns the value of attribute pockets.
19 20 21 |
# File 'lib/rafflesia/proteins/pocket_detect_data.rb', line 19 def pockets @pockets end |
#relation ⇒ Object
Returns the value of attribute relation.
19 20 21 |
# File 'lib/rafflesia/proteins/pocket_detect_data.rb', line 19 def relation @relation end |
#structure_id ⇒ Object
Returns the value of attribute structure_id.
19 20 21 |
# File 'lib/rafflesia/proteins/pocket_detect_data.rb', line 19 def structure_id @structure_id end |