module ParamsReady::Pagination::Direction::Before
Public Class Methods
invert_ordering?()
click to toggle source
# File lib/params_ready/pagination/direction.rb, line 90 def self.invert_ordering? true end
keysets(_, keysets, &block)
click to toggle source
# File lib/params_ready/pagination/direction.rb, line 112 def self.keysets(_, keysets, &block) BeforeKeysets.new(keysets, &block) end
nulls_strategy(strategy)
click to toggle source
# File lib/params_ready/pagination/direction.rb, line 103 def self.nulls_strategy(strategy) case strategy when :first then Nulls::Last when :last then Nulls::First else raise ParamsReadyError, "Unexpected nulls strategy: '#{strategy}'" end end
tendency(ordering)
click to toggle source
# File lib/params_ready/pagination/direction.rb, line 94 def self.tendency(ordering) case ordering when :desc then Tendency::Growing when :asc then Tendency::Falling else raise ParamsReadyError, "Unexpected ordering: '#{ordering}'" end end