diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-11-29 14:38:45 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-11-29 14:38:45 -0800 |
commit | 963ca860d579a507effbe818da0c89bf443f33c9 (patch) | |
tree | 6d79f4e60753e40b1e96346367a9cd89ebb9d648 /lib/arel/nodes/ordering.rb | |
parent | ad16c18cc3a7db4b56611b9244140f0b495a1214 (diff) | |
download | rails-963ca860d579a507effbe818da0c89bf443f33c9.tar.gz rails-963ca860d579a507effbe818da0c89bf443f33c9.tar.bz2 rails-963ca860d579a507effbe818da0c89bf443f33c9.zip |
adding unary node
Diffstat (limited to 'lib/arel/nodes/ordering.rb')
-rw-r--r-- | lib/arel/nodes/ordering.rb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/arel/nodes/ordering.rb b/lib/arel/nodes/ordering.rb index d395c8631d..0a3621cf54 100644 --- a/lib/arel/nodes/ordering.rb +++ b/lib/arel/nodes/ordering.rb @@ -1,10 +1,11 @@ module Arel module Nodes - class Ordering < Arel::Nodes::Node - attr_accessor :expr, :direction + class Ordering < Arel::Nodes::Binary + alias :expr :left + alias :direction :right - def initialize expression, direction = :asc - @expr, @direction = expression, direction + def initialize expr, direction = :asc + super end def ascending? |