class ParamsReady::Pagination::AbstractKeysets
Attributes
keysets[R]
Public Class Methods
new(keysets, &block)
click to toggle source
# File lib/params_ready/pagination/keysets.rb, line 6 def initialize(keysets, &block) @keysets = keysets @transform = block end
Public Instance Methods
length()
click to toggle source
# File lib/params_ready/pagination/keysets.rb, line 11 def length @keysets.length end
transform(raw)
click to toggle source
# File lib/params_ready/pagination/keysets.rb, line 15 def transform(raw) return raw if @transform.nil? @transform.call(raw) end