Class: Rafflesia::StructureComparisonPair
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::StructureComparisonPair
- Defined in:
- lib/rafflesia/proteins/structure_comparison_pair.rb
Constant Summary collapse
- HASH_ATTRS =
{ comparison_id: :comparison_id, method: :method, query_structure_id: :query_structure_id, sample_id: :sample_id, target_structure_id: :target_structure_id }.freeze
Instance Attribute Summary collapse
-
#comparison_id ⇒ Object
Returns the value of attribute comparison_id.
-
#method ⇒ Object
Returns the value of attribute method.
-
#query_structure_id ⇒ Object
Returns the value of attribute query_structure_id.
-
#sample_id ⇒ Object
Returns the value of attribute sample_id.
-
#target_structure_id ⇒ Object
Returns the value of attribute target_structure_id.
Instance Method Summary collapse
-
#initialize(json) ⇒ StructureComparisonPair
constructor
A new instance of StructureComparisonPair.
Constructor Details
#initialize(json) ⇒ StructureComparisonPair
Returns a new instance of StructureComparisonPair.
23 24 25 26 27 28 29 30 31 |
# File 'lib/rafflesia/proteins/structure_comparison_pair.rb', line 23 def initialize(json) super() hash = self.class.normalize(json) @comparison_id = hash[:comparison_id] @method = hash[:method] @query_structure_id = hash[:query_structure_id] @sample_id = hash[:sample_id] @target_structure_id = hash[:target_structure_id] end |
Instance Attribute Details
#comparison_id ⇒ Object
Returns the value of attribute comparison_id.
16 17 18 |
# File 'lib/rafflesia/proteins/structure_comparison_pair.rb', line 16 def comparison_id @comparison_id end |
#method ⇒ Object
Returns the value of attribute method.
16 17 18 |
# File 'lib/rafflesia/proteins/structure_comparison_pair.rb', line 16 def method @method end |
#query_structure_id ⇒ Object
Returns the value of attribute query_structure_id.
16 17 18 |
# File 'lib/rafflesia/proteins/structure_comparison_pair.rb', line 16 def query_structure_id @query_structure_id end |
#sample_id ⇒ Object
Returns the value of attribute sample_id.
16 17 18 |
# File 'lib/rafflesia/proteins/structure_comparison_pair.rb', line 16 def sample_id @sample_id end |
#target_structure_id ⇒ Object
Returns the value of attribute target_structure_id.
16 17 18 |
# File 'lib/rafflesia/proteins/structure_comparison_pair.rb', line 16 def target_structure_id @target_structure_id end |