Class: Rafflesia::InterfaceFeaturesData
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::InterfaceFeaturesData
- Defined in:
- lib/rafflesia/proteins/interface_features_data.rb
Constant Summary collapse
- HASH_ATTRS =
{ contact_pair_count: :contact_pair_count, features_computed: :features_computed, features_unavailable: :features_unavailable, interface_count: :interface_count, interfaces: :interfaces, is_truncated: :is_truncated, method: :method, radius: :radius, 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.
-
#features_computed ⇒ Object
Returns the value of attribute features_computed.
-
#features_unavailable ⇒ Object
Returns the value of attribute features_unavailable.
-
#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.
-
#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) ⇒ InterfaceFeaturesData
constructor
A new instance of InterfaceFeaturesData.
Constructor Details
#initialize(json) ⇒ InterfaceFeaturesData
Returns a new instance of InterfaceFeaturesData.
33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/rafflesia/proteins/interface_features_data.rb', line 33 def initialize(json) super() hash = self.class.normalize(json) @contact_pair_count = hash[:contact_pair_count] @features_computed = (hash[:features_computed] || []) @features_unavailable = hash[:features_unavailable] || {} @interface_count = hash[:interface_count] @interfaces = (hash[:interfaces] || []).map { |item| item ? Rafflesia::InterfaceFeature.new(item) : nil } @is_truncated = hash[:is_truncated] @method = hash[:method] @radius = hash[:radius] @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.
21 22 23 |
# File 'lib/rafflesia/proteins/interface_features_data.rb', line 21 def contact_pair_count @contact_pair_count end |
#features_computed ⇒ Object
Returns the value of attribute features_computed.
21 22 23 |
# File 'lib/rafflesia/proteins/interface_features_data.rb', line 21 def features_computed @features_computed end |
#features_unavailable ⇒ Object
Returns the value of attribute features_unavailable.
21 22 23 |
# File 'lib/rafflesia/proteins/interface_features_data.rb', line 21 def features_unavailable @features_unavailable end |
#interface_count ⇒ Object
Returns the value of attribute interface_count.
21 22 23 |
# File 'lib/rafflesia/proteins/interface_features_data.rb', line 21 def interface_count @interface_count end |
#interfaces ⇒ Object
Returns the value of attribute interfaces.
21 22 23 |
# File 'lib/rafflesia/proteins/interface_features_data.rb', line 21 def interfaces @interfaces end |
#is_truncated ⇒ Object
Returns the value of attribute is_truncated.
21 22 23 |
# File 'lib/rafflesia/proteins/interface_features_data.rb', line 21 def is_truncated @is_truncated end |
#method ⇒ Object
Returns the value of attribute method.
21 22 23 |
# File 'lib/rafflesia/proteins/interface_features_data.rb', line 21 def method @method end |
#radius ⇒ Object
Returns the value of attribute radius.
21 22 23 |
# File 'lib/rafflesia/proteins/interface_features_data.rb', line 21 def radius @radius end |
#returned_interface_count ⇒ Object
Returns the value of attribute returned_interface_count.
21 22 23 |
# File 'lib/rafflesia/proteins/interface_features_data.rb', line 21 def returned_interface_count @returned_interface_count end |
#structure_id ⇒ Object
Returns the value of attribute structure_id.
21 22 23 |
# File 'lib/rafflesia/proteins/interface_features_data.rb', line 21 def structure_id @structure_id end |