Class: JSONAPI::Paginator
- Inherits:
-
Object
- Object
- JSONAPI::Paginator
show all
- Defined in:
- lib/jsonapi/paginator.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Constructor Details
#initialize(_params) ⇒ Paginator
Returns a new instance of Paginator.
3
4
|
# File 'lib/jsonapi/paginator.rb', line 3
def initialize(_params)
end
|
Class Method Details
.paginator_for(paginator) ⇒ Object
30
31
32
33
|
# File 'lib/jsonapi/paginator.rb', line 30
def paginator_for(paginator)
paginator_class_name = "#{paginator.to_s.camelize}Paginator"
paginator_class_name.safe_constantize if paginator_class_name
end
|
.requires_record_count ⇒ Object
23
24
25
26
27
28
|
# File 'lib/jsonapi/paginator.rb', line 23
def requires_record_count
false
end
|
Instance Method Details
#apply(_relation, _order_options) ⇒ Object
6
7
8
|
# File 'lib/jsonapi/paginator.rb', line 6
def apply(_relation, _order_options)
end
|
#links_page_params(_options = {}) ⇒ Object
10
11
12
13
14
|
# File 'lib/jsonapi/paginator.rb', line 10
def links_page_params(_options = {})
{}
end
|
#requires_record_count ⇒ Object
16
17
18
19
20
|
# File 'lib/jsonapi/paginator.rb', line 16
def requires_record_count
self.class.requires_record_count
end
|