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