Class: Appwrite::Models::RowList
- Inherits:
-
Object
- Object
- Appwrite::Models::RowList
- Defined in:
- lib/appwrite/models/row_list.rb
Instance Attribute Summary collapse
-
#rows ⇒ Object
readonly
Returns the value of attribute rows.
-
#total ⇒ Object
readonly
Returns the value of attribute total.
Class Method Summary collapse
Instance Method Summary collapse
- #convert_to(from_json) ⇒ Object
-
#initialize(total:, rows:) ⇒ RowList
constructor
A new instance of RowList.
- #to_map ⇒ Object
Constructor Details
#initialize(total:, rows:) ⇒ RowList
Returns a new instance of RowList.
9 10 11 12 13 14 15 |
# File 'lib/appwrite/models/row_list.rb', line 9 def initialize( total:, rows: ) @total = total @rows = rows end |
Instance Attribute Details
#rows ⇒ Object (readonly)
Returns the value of attribute rows.
7 8 9 |
# File 'lib/appwrite/models/row_list.rb', line 7 def rows @rows end |
#total ⇒ Object (readonly)
Returns the value of attribute total.
6 7 8 |
# File 'lib/appwrite/models/row_list.rb', line 6 def total @total end |
Class Method Details
Instance Method Details
#convert_to(from_json) ⇒ Object
31 32 33 |
# File 'lib/appwrite/models/row_list.rb', line 31 def convert_to(from_json) rows.map { |it| it.convert_to(from_json) } end |
#to_map ⇒ Object
24 25 26 27 28 29 |
# File 'lib/appwrite/models/row_list.rb', line 24 def to_map { "total": @total, "rows": @rows.map { |it| it.to_map } } end |