aboutsummaryrefslogtreecommitdiffstats
path: root/lib/arel/nodes/descending.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/arel/nodes/descending.rb')
-rw-r--r--lib/arel/nodes/descending.rb23
1 files changed, 23 insertions, 0 deletions
diff --git a/lib/arel/nodes/descending.rb b/lib/arel/nodes/descending.rb
new file mode 100644
index 0000000000..d886bdcb5f
--- /dev/null
+++ b/lib/arel/nodes/descending.rb
@@ -0,0 +1,23 @@
+module Arel
+ module Nodes
+ class Descending < Ordering
+
+ def reverse
+ Ascending.new(expr)
+ end
+
+ def direction
+ :desc
+ end
+
+ def ascending?
+ false
+ end
+
+ def descending?
+ true
+ end
+
+ end
+ end
+end