aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/arel/nodes/ascending.rb
blob: 8b617f4df57231d5f37c02c0840c2bf65cef4d32 (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
# frozen_string_literal: true

module Arel # :nodoc: all
  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