Class: OpenSandbox::PaginationInfo
- Inherits:
-
Data
- Object
- Data
- OpenSandbox::PaginationInfo
- Defined in:
- lib/open_sandbox/models.rb
Overview
Value object for pagination
Instance Attribute Summary collapse
-
#has_next_page ⇒ Object
readonly
Returns the value of attribute has_next_page.
-
#page ⇒ Object
readonly
Returns the value of attribute page.
-
#page_size ⇒ Object
readonly
Returns the value of attribute page_size.
-
#total_items ⇒ Object
readonly
Returns the value of attribute total_items.
-
#total_pages ⇒ Object
readonly
Returns the value of attribute total_pages.
Class Method Summary collapse
Instance Attribute Details
#has_next_page ⇒ Object (readonly)
Returns the value of attribute has_next_page
61 62 63 |
# File 'lib/open_sandbox/models.rb', line 61 def has_next_page @has_next_page end |
#page ⇒ Object (readonly)
Returns the value of attribute page
61 62 63 |
# File 'lib/open_sandbox/models.rb', line 61 def page @page end |
#page_size ⇒ Object (readonly)
Returns the value of attribute page_size
61 62 63 |
# File 'lib/open_sandbox/models.rb', line 61 def page_size @page_size end |
#total_items ⇒ Object (readonly)
Returns the value of attribute total_items
61 62 63 |
# File 'lib/open_sandbox/models.rb', line 61 def total_items @total_items end |
#total_pages ⇒ Object (readonly)
Returns the value of attribute total_pages
61 62 63 |
# File 'lib/open_sandbox/models.rb', line 61 def total_pages @total_pages end |
Class Method Details
.from_hash(h) ⇒ Object
62 63 64 65 66 67 68 69 70 |
# File 'lib/open_sandbox/models.rb', line 62 def self.from_hash(h) new( page: h["page"], page_size: h["pageSize"], total_items: h["totalItems"], total_pages: h["totalPages"], has_next_page: h["hasNextPage"] ) end |