Sha256: 51b918502fd955059baa542fccfa38fe6460280447f9b710c615316ad427862a
Contents?: true
Size: 557 Bytes
Versions: 9
Compression:
Stored size: 557 Bytes
Contents
class ModelSet class SetQuery < Query delegate :add!, :unshift!, :subtract!, :intersect!, :reorder!, :reverse!, :reverse_reorder!, :shuffle!, :to => :set def anchor!(query) @set = query.ids.to_ordered_set end def set @set ||= [].to_ordered_set end def ids if limit set.limit(limit, offset) else set.clone end end def size if limit [count - offset, limit].min else count end end def count set.size end end end
Version data entries
9 entries across 9 versions & 2 rubygems