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