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.
32 33 34 35 36 37 |
# File 'lib/daytona/common/response.rb', line 32 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)
17 18 19 |
# File 'lib/daytona/common/response.rb', line 17 def items @items end |
#page ⇒ Float (readonly)
20 21 22 |
# File 'lib/daytona/common/response.rb', line 20 def page @page end |
#total ⇒ Float (readonly)
23 24 25 |
# File 'lib/daytona/common/response.rb', line 23 def total @total end |
#total_pages ⇒ Float (readonly)
26 27 28 |
# File 'lib/daytona/common/response.rb', line 26 def total_pages @total_pages end |