Class: GearedPagination::PortionAtCursor::Inequal

Inherits:
Predicate
  • Object
show all
Defined in:
lib/geared_pagination/portions/portion_at_cursor.rb

Instance Attribute Summary

Attributes inherited from Predicate

#order

Instance Method Summary collapse

Methods inherited from Predicate

#initialize

Constructor Details

This class inherits a constructor from GearedPagination::PortionAtCursor::Predicate

Instance Method Details

#condition_on(table, value) ⇒ Object



128
129
130
131
132
133
134
# File 'lib/geared_pagination/portions/portion_at_cursor.rb', line 128

def condition_on(table, value)
  if order.asc?
    table[attribute].gt(value)
  else
    table[attribute].lt(value)
  end
end