blob: 7f120ab9e5798757fcc067c54469ef3fcecf5bb5 (
plain) (
tree)
|
|
module ActiveRelation
class Range < Compound
attr_reader :range
def initialize(relation, range)
@relation, @range = relation, range
end
def ==(other)
relation == other.relation and
range == other.range
end
def limit
range.end - range.begin + 1
end
def offset
range.begin
end
def qualify
Range.new(relation.qualify, range)
end
end
end
|