class Cursed::Adapter::Base
Attributes
relation[R]
Public Class Methods
new(array)
click to toggle source
# File lib/cursed/adapter/base.rb, line 8 def initialize(array) @relation = array end
Public Instance Methods
apply_to(cursor)
click to toggle source
# File lib/cursed/adapter/base.rb, line 12 def apply_to(cursor) attr = cursor.attribute after(attr, cursor.after) if cursor.after? before(attr, cursor.before) if cursor.before? if cursor.forward? ascend_by(attr) else descend_by(attr) end limit(cursor.clamped_limit) relation end