Class: Daytona::PaginatedResource
- Inherits:
-
Object
- Object
- Daytona::PaginatedResource
- Defined in:
- lib/daytona/common/response.rb
Instance Attribute Summary collapse
- #items ⇒ Array<Object> readonly
- #page ⇒ Float readonly
- #total ⇒ Float readonly
- #total_pages ⇒ Float readonly
Instance Method Summary collapse
-
#initialize(items:, page:, total:, total_pages:) ⇒ PaginatedResource
constructor
A new instance of PaginatedResource.
Constructor Details
#initialize(items:, page:, total:, total_pages:) ⇒ PaginatedResource
Returns a new instance of PaginatedResource.
21 22 23 24 25 26 |
# File 'lib/daytona/common/response.rb', line 21 def initialize(items:, page:, total:, total_pages:) @items = items @page = page @total = total @total_pages = total_pages end |
Instance Attribute Details
#items ⇒ Array<Object> (readonly)
6 7 8 |
# File 'lib/daytona/common/response.rb', line 6 def items @items end |
#page ⇒ Float (readonly)
9 10 11 |
# File 'lib/daytona/common/response.rb', line 9 def page @page end |
#total ⇒ Float (readonly)
12 13 14 |
# File 'lib/daytona/common/response.rb', line 12 def total @total end |
#total_pages ⇒ Float (readonly)
15 16 17 |
# File 'lib/daytona/common/response.rb', line 15 def total_pages @total_pages end |