Class: Rafflesia::AnmModeRecord
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::AnmModeRecord
- Defined in:
- lib/rafflesia/proteins/anm_mode_record.rb
Constant Summary collapse
- HASH_ATTRS =
{ displacements: :displacements, eigenvalue: :eigenvalue, index: :index }.freeze
Instance Attribute Summary collapse
-
#displacements ⇒ Object
Returns the value of attribute displacements.
-
#eigenvalue ⇒ Object
Returns the value of attribute eigenvalue.
-
#index ⇒ Object
Returns the value of attribute index.
Instance Method Summary collapse
-
#initialize(json) ⇒ AnmModeRecord
constructor
A new instance of AnmModeRecord.
Constructor Details
#initialize(json) ⇒ AnmModeRecord
Returns a new instance of AnmModeRecord.
19 20 21 22 23 24 25 |
# File 'lib/rafflesia/proteins/anm_mode_record.rb', line 19 def initialize(json) super() hash = self.class.normalize(json) @displacements = (hash[:displacements] || []).map { |item| item ? Rafflesia::AnmModeDisplacement.new(item) : nil } @eigenvalue = hash[:eigenvalue] @index = hash[:index] end |
Instance Attribute Details
#displacements ⇒ Object
Returns the value of attribute displacements.
14 15 16 |
# File 'lib/rafflesia/proteins/anm_mode_record.rb', line 14 def displacements @displacements end |
#eigenvalue ⇒ Object
Returns the value of attribute eigenvalue.
14 15 16 |
# File 'lib/rafflesia/proteins/anm_mode_record.rb', line 14 def eigenvalue @eigenvalue end |
#index ⇒ Object
Returns the value of attribute index.
14 15 16 |
# File 'lib/rafflesia/proteins/anm_mode_record.rb', line 14 def index @index end |