Class: GearedPagination::PortionAtCursor::Match

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#headObject (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

#tailObject (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