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