blob: 04fd9fea629b11a899811be7e9613c21a799dbbd (
plain) (
tree)
|
|
module Arel
class Group < Compound
attributes :relation, :groupings
deriving :==
def initialize(relation, *groupings, &block)
@relation = relation
@groupings = (groupings + (block_given?? [yield(relatoin)] : [])).collect { |g| g.bind(relation) }
end
def externalizable?
true
end
end
end
|