Class: ParamsReady::Pagination::AbstractKeysets
- Inherits:
-
Object
- Object
- ParamsReady::Pagination::AbstractKeysets
show all
- Defined in:
- lib/params_ready/pagination/keysets.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
#initialize(keysets, &block) ⇒ AbstractKeysets
6
7
8
9
|
# File 'lib/params_ready/pagination/keysets.rb', line 6
def initialize(keysets, &block)
@keysets = keysets
@transform = block
end
|
Instance Attribute Details
#keysets ⇒ Object
Returns the value of attribute keysets.
4
5
6
|
# File 'lib/params_ready/pagination/keysets.rb', line 4
def keysets
@keysets
end
|
Instance Method Details
#length ⇒ Object
11
12
13
|
# File 'lib/params_ready/pagination/keysets.rb', line 11
def length
@keysets.length
end
|
15
16
17
18
|
# File 'lib/params_ready/pagination/keysets.rb', line 15
def transform(raw)
return raw if @transform.nil?
@transform.call(raw)
end
|