Sha256: 4695f3ed2a42a4fe03d7a590d131298baecf9d4825bede820140aee5296b7ce3

Contents?: true

Size: 302 Bytes

Versions: 11

Compression:

Stored size: 302 Bytes

Contents

module Arel
  class Group < Compound
    attributes :relation, :groupings
    deriving :==

    def initialize(relation, *groupings, &block)
      @relation = relation
      @groupings = (groupings + arguments_from_block(relation, &block)) \
        .collect { |g| g.bind(relation) }
    end
  end
end

Version data entries

11 entries across 11 versions & 2 rubygems

Version Path
arel-compat-0.4.0 lib/arel/algebra/relations/operations/group.rb
arel-0.4.0 lib/arel/algebra/relations/operations/group.rb
arel-0.3.3 lib/arel/algebra/relations/operations/group.rb
arel-0.3.2 lib/arel/algebra/relations/operations/group.rb
arel-0.3.1 lib/arel/algebra/relations/operations/group.rb
arel-0.3.0 lib/arel/algebra/relations/operations/group.rb
arel-0.2.1 lib/arel/algebra/relations/operations/group.rb
arel-0.2.0 lib/arel/algebra/relations/operations/group.rb
arel-0.2.pre lib/arel/algebra/relations/operations/group.rb
arel-0.1.2 lib/arel/algebra/relations/operations/group.rb
arel-0.1.0 lib/arel/algebra/relations/operations/group.rb