Class: PublishMyData::ResourcePaginationParams
- Inherits:
-
PaginationParams
- Object
- PaginationParams
- PublishMyData::ResourcePaginationParams
- Defined in:
- lib/publish_my_data/paginator.rb
Instance Attribute Summary
Attributes inherited from PaginationParams
#format, #offset, #page, #per_page
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ ResourcePaginationParams
constructor
A new instance of ResourcePaginationParams.
Methods inherited from PaginationParams
Constructor Details
#initialize(opts = {}) ⇒ ResourcePaginationParams
Returns a new instance of ResourcePaginationParams.
42 43 44 45 46 |
# File 'lib/publish_my_data/paginator.rb', line 42 def initialize(opts={}) opts[:per_page] ||= PublishMyData.default_html_resources_per_page opts[:per_page] = PublishMyData.max_resources_per_page if opts[:per_page].to_i > PublishMyData.max_resources_per_page super end |