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