Class: GearedPagination::PortionAtCursor::Match
- Inherits:
-
Object
- Object
- GearedPagination::PortionAtCursor::Match
- Defined in:
- lib/geared_pagination/portions/portion_at_cursor.rb
Instance Attribute Summary collapse
-
#head ⇒ Object
readonly
Returns the value of attribute head.
-
#tail ⇒ Object
readonly
Returns the value of attribute tail.
Instance Method Summary collapse
- #condition_on(table, cursor) ⇒ Object
-
#initialize(head, tail) ⇒ Match
constructor
A new instance of Match.
Constructor Details
#initialize(head, tail) ⇒ Match
Returns a new instance of Match.
90 91 92 |
# File 'lib/geared_pagination/portions/portion_at_cursor.rb', line 90 def initialize(head, tail) @head, @tail = head, tail end |
Instance Attribute Details
#head ⇒ Object (readonly)
Returns the value of attribute head.
88 89 90 |
# File 'lib/geared_pagination/portions/portion_at_cursor.rb', line 88 def head @head end |
#tail ⇒ Object (readonly)
Returns the value of attribute tail.
88 89 90 |
# File 'lib/geared_pagination/portions/portion_at_cursor.rb', line 88 def tail @tail end |
Instance Method Details
#condition_on(table, cursor) ⇒ Object
94 95 96 |
# File 'lib/geared_pagination/portions/portion_at_cursor.rb', line 94 def condition_on(table, cursor) conditions_on(table, cursor).reduce { |left, right| left.and(right) } end |