Class: Rafflesia::FoldSegmentGenerationData
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::FoldSegmentGenerationData
- Defined in:
- lib/rafflesia/proteins/fold_segment_generation_data.rb
Constant Summary collapse
- HASH_ATTRS =
{ activated: :activated, active_ref: :active_ref, name: :name, previous_active: :previous_active, previous_active_ref: :previous_active_ref, reason: :reason, records: :records, transitioned_at: :transitioned_at }.freeze
Instance Attribute Summary collapse
-
#activated ⇒ Object
Returns the value of attribute activated.
-
#active_ref ⇒ Object
Returns the value of attribute active_ref.
-
#name ⇒ Object
Returns the value of attribute name.
-
#previous_active ⇒ Object
Returns the value of attribute previous_active.
-
#previous_active_ref ⇒ Object
Returns the value of attribute previous_active_ref.
-
#reason ⇒ Object
Returns the value of attribute reason.
-
#records ⇒ Object
Returns the value of attribute records.
-
#transitioned_at ⇒ Object
Returns the value of attribute transitioned_at.
Instance Method Summary collapse
-
#initialize(json) ⇒ FoldSegmentGenerationData
constructor
A new instance of FoldSegmentGenerationData.
Constructor Details
#initialize(json) ⇒ FoldSegmentGenerationData
Returns a new instance of FoldSegmentGenerationData.
29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/rafflesia/proteins/fold_segment_generation_data.rb', line 29 def initialize(json) super() hash = self.class.normalize(json) @activated = hash[:activated] ? Rafflesia::FoldSegmentPublishData.new(hash[:activated]) : nil @active_ref = hash[:active_ref] @name = hash[:name] @previous_active = hash[:previous_active] ? Rafflesia::FoldSegmentPublishData.new(hash[:previous_active]) : nil @previous_active_ref = hash[:previous_active_ref] @reason = hash[:reason] @records = (hash[:records] || []).map { |item| item ? Rafflesia::FoldSegmentPublishData.new(item) : nil } @transitioned_at = hash[:transitioned_at] end |
Instance Attribute Details
#activated ⇒ Object
Returns the value of attribute activated.
19 20 21 |
# File 'lib/rafflesia/proteins/fold_segment_generation_data.rb', line 19 def activated @activated end |
#active_ref ⇒ Object
Returns the value of attribute active_ref.
19 20 21 |
# File 'lib/rafflesia/proteins/fold_segment_generation_data.rb', line 19 def active_ref @active_ref end |
#name ⇒ Object
Returns the value of attribute name.
19 20 21 |
# File 'lib/rafflesia/proteins/fold_segment_generation_data.rb', line 19 def name @name end |
#previous_active ⇒ Object
Returns the value of attribute previous_active.
19 20 21 |
# File 'lib/rafflesia/proteins/fold_segment_generation_data.rb', line 19 def previous_active @previous_active end |
#previous_active_ref ⇒ Object
Returns the value of attribute previous_active_ref.
19 20 21 |
# File 'lib/rafflesia/proteins/fold_segment_generation_data.rb', line 19 def previous_active_ref @previous_active_ref end |
#reason ⇒ Object
Returns the value of attribute reason.
19 20 21 |
# File 'lib/rafflesia/proteins/fold_segment_generation_data.rb', line 19 def reason @reason end |
#records ⇒ Object
Returns the value of attribute records.
19 20 21 |
# File 'lib/rafflesia/proteins/fold_segment_generation_data.rb', line 19 def records @records end |
#transitioned_at ⇒ Object
Returns the value of attribute transitioned_at.
19 20 21 |
# File 'lib/rafflesia/proteins/fold_segment_generation_data.rb', line 19 def transitioned_at @transitioned_at end |