module ParamsReady::Pagination::Direction::After

Public Class Methods

invert_ordering?() click to toggle source
# File lib/params_ready/pagination/direction.rb, line 120
def self.invert_ordering?
  false
end
keysets(last, keysets, &block) click to toggle source
# File lib/params_ready/pagination/direction.rb, line 142
def self.keysets(last, keysets, &block)
  AfterKeysets.new(last, keysets, &block)
end
nulls_strategy(strategy) click to toggle source
# File lib/params_ready/pagination/direction.rb, line 133
def self.nulls_strategy(strategy)
  case strategy
  when :first then Nulls::First
  when :last then Nulls::Last
  else
    raise ParamsReadyError, "Unexpected nulls strategy: '#{strategy}'"
  end
end
tendency(ordering) click to toggle source
# File lib/params_ready/pagination/direction.rb, line 124
def self.tendency(ordering)
  case ordering
  when :asc then Tendency::Growing
  when :desc then Tendency::Falling
  else
    raise ParamsReadyError, "Unexpected ordering: '#{ordering}'"
  end
end