Class: Rafflesia::InterfaceDetectData
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::InterfaceDetectData
- Defined in:
- lib/rafflesia/proteins/interface_detect_data.rb
Constant Summary collapse
- HASH_ATTRS =
{ contact_pair_count: :contact_pair_count, interface_count: :interface_count, interfaces: :interfaces, is_truncated: :is_truncated, method: :method, radius: :radius, relation: :relation, returned_interface_count: :returned_interface_count, structure_id: :structure_id }.freeze
Instance Attribute Summary collapse
-
#contact_pair_count ⇒ Object
Returns the value of attribute contact_pair_count.
-
#interface_count ⇒ Object
Returns the value of attribute interface_count.
-
#interfaces ⇒ Object
Returns the value of attribute interfaces.
-
#is_truncated ⇒ Object
Returns the value of attribute is_truncated.
-
#method ⇒ Object
Returns the value of attribute method.
-
#radius ⇒ Object
Returns the value of attribute radius.
-
#relation ⇒ Object
Returns the value of attribute relation.
-
#returned_interface_count ⇒ Object
Returns the value of attribute returned_interface_count.
-
#structure_id ⇒ Object
Returns the value of attribute structure_id.
Instance Method Summary collapse
-
#initialize(json) ⇒ InterfaceDetectData
constructor
A new instance of InterfaceDetectData.
Constructor Details
#initialize(json) ⇒ InterfaceDetectData
Returns a new instance of InterfaceDetectData.
31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/rafflesia/proteins/interface_detect_data.rb', line 31 def initialize(json) super() hash = self.class.normalize(json) @contact_pair_count = hash[:contact_pair_count] @interface_count = hash[:interface_count] @interfaces = (hash[:interfaces] || []).map { |item| item ? Rafflesia::Interface.new(item) : nil } @is_truncated = hash[:is_truncated] @method = hash[:method] @radius = hash[:radius] @relation = hash[:relation] ? Rafflesia::RelationArtifactData.new(hash[:relation]) : nil @returned_interface_count = hash[:returned_interface_count] @structure_id = hash[:structure_id] end |
Instance Attribute Details
#contact_pair_count ⇒ Object
Returns the value of attribute contact_pair_count.
20 21 22 |
# File 'lib/rafflesia/proteins/interface_detect_data.rb', line 20 def contact_pair_count @contact_pair_count end |
#interface_count ⇒ Object
Returns the value of attribute interface_count.
20 21 22 |
# File 'lib/rafflesia/proteins/interface_detect_data.rb', line 20 def interface_count @interface_count end |
#interfaces ⇒ Object
Returns the value of attribute interfaces.
20 21 22 |
# File 'lib/rafflesia/proteins/interface_detect_data.rb', line 20 def interfaces @interfaces end |
#is_truncated ⇒ Object
Returns the value of attribute is_truncated.
20 21 22 |
# File 'lib/rafflesia/proteins/interface_detect_data.rb', line 20 def is_truncated @is_truncated end |
#method ⇒ Object
Returns the value of attribute method.
20 21 22 |
# File 'lib/rafflesia/proteins/interface_detect_data.rb', line 20 def method @method end |
#radius ⇒ Object
Returns the value of attribute radius.
20 21 22 |
# File 'lib/rafflesia/proteins/interface_detect_data.rb', line 20 def radius @radius end |
#relation ⇒ Object
Returns the value of attribute relation.
20 21 22 |
# File 'lib/rafflesia/proteins/interface_detect_data.rb', line 20 def relation @relation end |
#returned_interface_count ⇒ Object
Returns the value of attribute returned_interface_count.
20 21 22 |
# File 'lib/rafflesia/proteins/interface_detect_data.rb', line 20 def returned_interface_count @returned_interface_count end |
#structure_id ⇒ Object
Returns the value of attribute structure_id.
20 21 22 |
# File 'lib/rafflesia/proteins/interface_detect_data.rb', line 20 def structure_id @structure_id end |