1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/lib/arel/nodes/unary.rb

29 lines
400 B
Ruby
Raw Normal View History

2010-11-29 17:38:45 -05:00
module Arel
module Nodes
class Unary < Arel::Nodes::Node
attr_accessor :expr
2010-12-14 23:53:19 -05:00
alias :value :expr
2010-11-29 17:38:45 -05:00
def initialize expr
@expr = expr
end
end
2010-12-14 23:53:19 -05:00
%w{
Bin
2010-12-14 23:53:19 -05:00
Group
Having
Limit
Not
Offset
2010-12-14 23:53:19 -05:00
On
Ordering
Top
2011-02-21 18:14:29 -05:00
Lock
2011-04-21 16:46:24 -04:00
DistinctOn
2010-12-14 23:53:19 -05:00
}.each do |name|
const_set(name, Class.new(Unary))
end
2010-11-29 17:38:45 -05:00
end
end