Module: Shamu::Entities::ListScope::ScopedPaging
- Defined in:
- lib/shamu/entities/list_scope/scoped_paging.rb
Overview
Include paging parsing and attributes exposed as a nested page object. Adds the following attributes to the list scope:
class UsersListScope < Shamu::Entities::ListScope
include Shamu::Entities::ListScope::ScopedPaging
end
scope = UsersListScope.coerce!( page: { number: 5, size: 50 } )
scope.page.number # => 5
scope.page.size # => 50
Defined Under Namespace
Classes: PageScope
Attributes collapse
-
#page ⇒ PageScope
The paging scope.
Instance Method Summary collapse
-
#scoped_page? ⇒ Boolean
True if the scope is paged.
Instance Attribute Details
#page ⇒ PageScope
Returns the paging scope.
|
# File 'lib/shamu/entities/list_scope/scoped_paging.rb', line 23
|
Instance Method Details
#scoped_page? ⇒ Boolean
Returns true if the scope is paged.
36 37 38 |
# File 'lib/shamu/entities/list_scope/scoped_paging.rb', line 36 def scoped_page? !!page.number end |