aboutsummaryrefslogtreecommitdiffstats
path: root/lib/arel/nodes/unary.rb
blob: f679017597d88a699123ff525c63afd35fe7075e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
module Arel
  module Nodes
    class Unary < Arel::Nodes::Node
      attr_accessor :expr
      alias :value :expr

      def initialize expr
        @expr = expr
      end
    end

    %w{
      Not
      Group
      Grouping
      Offset
      Having
      On
    }.each do |name|
      const_set(name, Class.new(Unary))
    end
  end
end