Class: Shamu::Entities::ListScope::ScopedPaging::PageScope
- Inherits:
-
Object
- Object
- Shamu::Entities::ListScope::ScopedPaging::PageScope
- Includes:
- Attributes
- Defined in:
- lib/shamu/entities/list_scope/scoped_paging.rb
Overview
The scope of a [ScopedPaging] list scope.
Instance Attribute Summary collapse
-
#default_size ⇒ Integer
The default page size if not specified.
-
#number ⇒ Integer
The page number.
-
#size ⇒ Integer
The size of each page.
Instance Method Summary collapse
-
#params ⇒ Hash
The scope as a params hash.
Methods included from Attributes
#[], #assign_attributes, association, associations, attribute, #attribute?, attributes, #initialize, #set?, #slice, #to_attributes
Instance Attribute Details
#default_size ⇒ Integer
Returns the default page size if not specified.
54 |
# File 'lib/shamu/entities/list_scope/scoped_paging.rb', line 54 attribute :default_size, coerce: :to_i, default: 25, serialize: false |
#number ⇒ Integer
Returns the page number.
46 |
# File 'lib/shamu/entities/list_scope/scoped_paging.rb', line 46 attribute :number, coerce: :to_i |
#size ⇒ Integer
Returns the size of each page.
50 |
# File 'lib/shamu/entities/list_scope/scoped_paging.rb', line 50 attribute :size, coerce: :to_i, default: ->() { default_size } |
Instance Method Details
#params ⇒ Hash
Returns the scope as a params hash.
57 58 59 |
# File 'lib/shamu/entities/list_scope/scoped_paging.rb', line 57 def params to_attributes end |